Bug 831813

Summary: Bug.search(id,component) fails: called with N bind variables when N+2 are needed
Product: [Community] Bugzilla Reporter: Ed Santiago <santiago>
Component: WebServiceAssignee: Simon Green <sgreen>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2CC: ebaak
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-11 06:22:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
short perl reproducer none

Description Ed Santiago 2012-06-13 19:42:11 UTC
Created attachment 591617 [details]
short perl reproducer

Invoking XML-RPC Bug.search(id => NN, component => 'kernel-rt') fails:

DBD::mysql::db selectall_arrayref failed: called with 1 bind variables when 3 are needed [for Statement "SELECT assigned_to,bug_file_loc,bug_id,bug_severity,bug_status,cclist_accessible,component_id,delta_ts,estimated_time,everconfirmed,lastdiffed,op_sys,priority,product_id,qa_contact,remaining_time,rep_platform,reporter_accessible,resolution,short_desc,status_whiteboard,target_milestone,version,reporter    AS reporter_id,DATE_FORMAT(creation_ts, '%Y.%m.%d %H:%i') AS creation_ts,DATE_FORMAT(deadline, '%Y-%m-%d') AS deadline,cf_fixed_in,cf_release_notes,cf_story_points,cf_clone_of,cf_environment,cf_last_closed,cf_type,cf_regression_status,cf_mount_type,cf_documentation_action,cf_crm,cf_verified_branch FROM bugs WHERE 
(bug_id IN  
   (SELECT bug_id
    FROM bugs b
        JOIN bug_cf_extra_component e USING (bug_id)
        JOIN components c ON (c.product_id = b.product_id AND e.value = c.name)
    WHERE c.id = ?
   )
 OR bugs.component_id = ?
) AND bug_id = ?  ORDER BY bug_id"] at Bugzilla/Object.pm line 293
        Bugzilla::Object::__ANON__() called at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Timeout.pm line 31
        eval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Timeout.pm line 31
        DBIx::Timeout::call_with_timeout('undef', 'dbh', 'Bugzilla::DB::Mysql=HASH(0x902b750)', 'timeout', 118, 'code', 'CODE(0x91b44e0)') called at Bugzilla/Object.pm line 299
        Bugzilla::Object::_do_list_select('Bugzilla::Bug', '\x{a}(bug_id IN  \x{a}   (SELECT bug_id\x{a}    FROM bugs b\x{a}        JOIN ...', 'ARRAY(0x93af4d0)', 'undef') called at Bugzilla/Bug.pm line 328
        Bugzilla::Bug::_do_list_select('Bugzilla::Bug', '\x{a}(bug_id IN  \x{a}   (SELECT bug_id\x{a}    FROM bugs b\x{a}        JOIN ...', 'ARRAY(0x93af4d0)', 'undef') called at Bugzilla/Object.pm line 257
        Bugzilla::Object::match('Bugzilla::Bug', 'HASH(0x8e52b40)') called at Bugzilla/Bug.pm line 581
        Bugzilla::Bug::match('Bugzilla::Bug', 'HASH(0x8e52b40)') called at Bugzilla/WebService/Bug.pm line 504
        Bugzilla::WebService::Bug::search('Bugzilla::WebService::Bug', 'HASH(0x8d01fa0)') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2816
        eval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2801
        eval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2767
        SOAP::Server::handle('Bugzilla::WebService::Server::XMLRPC=HASH(0x8c21760)', '<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName...') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 432
        SOAP::Transport::HTTP::Server::handle('Bugzilla::WebService::Server::XMLRPC=HASH(0x8c21760)') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 597
        SOAP::Transport::HTTP::CGI::handle('Bugzilla::WebService::Server::XMLRPC=HASH(0x8c21760)') called at /var/www/html/bugzilla/xmlrpc.cgi line 48


Changing 'kernel-rt' to just 'kernel' makes it work (but not very usefully).

See attachment for source code that reproduces the error on Fedora 16 using perl-5.14.2-197.fc16.x86_64 and perl-SOAP-Lite-0.712-8.fc16.noarch

Comment 1 Simon Green 2012-09-11 06:22:13 UTC

*** This bug has been marked as a duplicate of bug 851651 ***