Bug 521198

Summary: Catalog breaks when processing needinfo/hwcert_work_* flag
Product: [Retired] Red Hat Hardware Certification Program Reporter: XINSUN <xisun>
Component: Hardware CatalogAssignee: XINSUN <xisun>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: averma, bsun, dmao, rlandry, ykun, yyang, zhuang
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-18 09:41:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description XINSUN 2009-09-04 09:22:16 UTC
Description of problem:

This bug happens in process the cert: 
https://hardware.redhat.com/show.cgi?id=501793.

When modifying the spec UI and remove a needinfo flag on TAM via "Remove" check box, catalog breaks and throw the error:

process.cgi: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [for Statement "SELECT 1, flagtypes.id, flagtypes.name, flagtypes.description, flagtypes.cc_list, flagtypes.target_type, flagtypes.sortkey, flagtypes.is_active, flagtypes.is_requestable, flagtypes.is_requesteeble, flagtypes.is_multiplicable, flagtypes.view_group_id, flagtypes.grant_group_id, flagtypes.request_group_id FROM flagtypes WHERE flagtypes.id = "] at Bugzilla/DB.pm line 65


Apache log:

[Tue Sep 01 14:11:15 2009] [error] [client 10.8.2.154] [Tue Sep  1 14:11:15 2009] process.cgi: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [for Statement "SELECT 1, flagtypes.id, flagtypes.name, flagtypes.description, flagtypes.cc_list, flagtypes.target_type, flagtypes.sortkey, flagtypes.is_active, flagtypes.is_requestable, flagtypes.is_requesteeble, flagtypes.is_multiplicable, flagtypes.view_group_id, flagtypes.grant_group_id, flagtypes.request_group_id FROM flagtypes WHERE flagtypes.id = "] at Bugzilla/DB.pm line 65, referer: https://hardware.redhat.com/show.cgi?id=501793
[Tue Sep 01 14:11:15 2009] [error] [client 10.8.2.154] [Tue Sep  1 14:11:15 2009] process.cgi: \tBugzilla::DB::SendSQL('SELECT 1, flagtypes.id, flagtypes.name, flagtypes.description...') called at Bugzilla/FlagType.pm line 75, referer: https://hardware.redhat.com/show.cgi?id=501793
[Tue Sep 01 14:11:15 2009] [error] [client 10.8.2.154] [Tue Sep  1 14:11:15 2009] process.cgi: \tBugzilla::FlagType::get('undef') called at Bugzilla/Flag.pm line 742, referer: https://hardware.redhat.com/show.cgi?id=501793
[Tue Sep 01 14:11:15 2009] [error] [client 10.8.2.154] [Tue Sep  1 14:11:15 2009] process.cgi: \tBugzilla::Flag::perlify_record() called at Bugzilla/Flag.pm line 82, referer: https://hardware.redhat.com/show.cgi?id=501793
[Tue Sep 01 14:11:15 2009] [error] [client 10.8.2.154] [Tue Sep  1 14:11:15 2009] process.cgi: \tBugzilla::Flag::get(494891) called at Bugzilla/Flag.pm line 155, referer: https://hardware.redhat.com/show.cgi?id=501793
[Tue Sep 01 14:11:15 2009] [error] [client 10.8.2.154] [Tue Sep  1 14:11:15 2009] process.cgi: \tBugzilla::Flag::validate('HASH(0x5b00970)', 501793) called at /var/www/html/hwcert/process.cgi line 198, referer: https://hardware.redhat.com/show.cgi?id=501793

This bug can not always produced, we just met this once. 

To reviewers:
If you have met this, please take a note to record the operation you did.These clue is very useful to fix this bug for us.

Comment 2 XINSUN 2009-09-18 09:41:37 UTC
I will close this bug as  WORKSFORME. 
Because we do not encounter it again and cannot reproduce this.
I also tried to find bad data or bad code but failed. :(


If anyone encounter this again, please reopen this bug. 

Thanks a lot!
Nicho