Bug 851651 - xmlrpclib.Fault with raw SQL when asked for bugs of a nonexistent component
xmlrpclib.Fault with raw SQL when asked for bugs of a nonexistent component
Status: CLOSED CURRENTRELEASE
Product: Bugzilla
Classification: Community
Component: WebService (Show other bugs)
4.2
Unspecified Unspecified
low Severity low (vote)
: ---
: ---
Assigned To: Matt Tyson
tools-bugs
:
: 831813 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-24 11:25 EDT by Ales Zelinka
Modified: 2013-06-23 23:25 EDT (History)
2 users (show)

See Also:
Fixed In Version: 4.2.4-6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-14 22:55:00 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ales Zelinka 2012-08-24 11:25:59 EDT
$python 
>>> from bugzilla import Bugzilla
>>> bugzilla = Bugzilla(url="https://bugzilla.redhat.com/xmlrpc.cgi")
>>> buglist = bugzilla.query({'product':'Red Hat Enterprise Linux 5' , 'component':'asdasdasd'})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 544, in query
    r = self._query(query)
  File "/usr/lib/python2.6/site-packages/bugzilla/rhbugzilla.py", line 578, in _query
    ret = self._proxy.Bug.search(query)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 1020, in request_with_cookies
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -32000: '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_cust_facing,cf_internal_whiteboard,cf_devel_whiteboard,cf_qa_whiteboard,cf_release_notes,cf_pm_score,cf_build_id,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 \n(bug_id IN  \n   (SELECT bug_id\n    FROM bugs b\n        JOIN bug_cf_extra_component e USING (bug_id)\n        JOIN components c ON (c.product_id = b.product_id AND e.value = c.name)\n    WHERE c.id = ?\n   )\n OR bugs.component_id = ?\n) AND product_id = ?  ORDER BY bug_id"] at Bugzilla/Object.pm line 293\n\tBugzilla::Object::__ANON__() called at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Timeout.pm line 31\n\teval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Timeout.pm line 31\n\tDBIx::Timeout::call_with_timeout(\'undef\', \'dbh\', \'Bugzilla::DB::Mysql=HASH(0x6884470)\', \'timeout\', 118, \'code\', \'CODE(0x694f050)\') called at Bugzilla/Object.pm line 299\n\tBugzilla::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(0x693dc80)\', \'undef\') called at Bugzilla/Bug.pm line 328\n\tBugzilla::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(0x693dc80)\', \'undef\') called at Bugzilla/Object.pm line 257\n\tBugzilla::Object::match(\'Bugzilla::Bug\', \'HASH(0x66b0230)\') called at Bugzilla/Bug.pm line 581\n\tBugzilla::Bug::match(\'Bugzilla::Bug\', \'HASH(0x66b0230)\') called at Bugzilla/WebService/Bug.pm line 507\n\tBugzilla::WebService::Bug::search(\'Bugzilla::WebService::Bug\', \'HASH(0x6555be0)\') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2816\n\teval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2801\n\teval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2767\n\tSOAP::Server::handle(\'Bugzilla::WebService::Server::XMLRPC=HASH(0x64740e0)\', \'<?xml version=\\\'1.0\\\'?>\\x{a}<methodCall>\\x{a}<methodName>Bug.search</...\') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 432\n\tSOAP::Transport::HTTP::Server::handle(\'Bugzilla::WebService::Server::XMLRPC=HASH(0x64740e0)\') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 597\n\tSOAP::Transport::HTTP::CGI::handle(\'Bugzilla::WebService::Server::XMLRPC=HASH(0x64740e0)\') called at /var/www/html/bugzilla/xmlrpc.cgi line 48\n'>


Bugzilla should be able to handle nonexistent components and either return an empty list of bugs of better a proper error message. 

Version-Release number of selected component (if applicable):
version 4.2.2-3.4
Comment 2 Simon Green 2012-09-11 02:22:13 EDT
*** Bug 831813 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.