Closed Bug 218977 Opened 21 years ago Closed 21 years ago

"Table 'namedqueries' was not locked with LOCK TABLES" on ThrowUserError('product_edit_denied')

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
blocker

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: th.schmidt, Assigned: goobix)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 Product group settings: Group X: Default/Mandatory CANEDIT Actual User is not member of X Reproducible: Always Steps to Reproduce: 1. select bug 2. change e.g. Platform 3. commit URL: http://localhost/bugzilla/process_bug.cgi Template->process() failed twice. First error: undef error - DBD::mysql::st execute failed: Table 'namedqueries' was not locked with LOCK TABLES [for Statement " SELECT name, query, linkinfooter FROM namedqueries WHERE userid=? ORDER BY UPPER(name)"] at Bugzilla/User.pm line 155 Bugzilla::User::queries('Bugzilla::User=HASH(0x86202d0)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Stash.pm line 649 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Stash.pm line 649 Template::Stash::_dotop('Template::Stash=HASH(0x86831ec)', 'Bugzilla::User=HASH(0x86202d0)', 'queries', 0) called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Stash.pm line 411 Template::Stash::get('Template::Stash=HASH(0x86831ec)', 'ARRAY(0x8718924)') called at data/template/en/default/global/site-navigation.html.tmpl line 114 eval {...} called at data/template/en/default/global/site-navigation.html.tmpl line 16 Template::Provider::__ANON__('Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 141 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 139 Template::Document::process('Template::Document=HASH(0x8715a30)', 'Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 340 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 320 Template::Context::process('Template::Context=HASH(0x85d67e8)', 'global/site-navigation.html.tmpl') called at data/template/en/default/global/header.html.tmpl line 49 eval {...} called at data/template/en/default/global/header.html.tmpl line 16 Template::Provider::__ANON__('Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 141 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 139 Template::Document::process('Template::Document=HASH(0x87018c4)', 'Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 340 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 320 Template::Context::process('Template::Context=HASH(0x85d67e8)', 'global/header.html.tmpl') called at data/template/en/default/global/user-error.html.tmpl line 1759 eval {...} called at data/template/en/default/global/user-error.html.tmpl line 16 Template::Provider::__ANON__('Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 141 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 139 Template::Document::process('Template::Document=HASH(0x86f51cc)', 'Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 340 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 320 Template::Context::process('Template::Context=HASH(0x85d67e8)', 'Template::Document=HASH(0x86f51cc)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Service.pm line 97 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Service.pm line 94 Template::Service::process('Template::Service=HASH(0x85aee78)', 'global/user-error.html.tmpl', 'HASH(0x86850e0)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template.pm line 76 Template::process('Bugzilla::Template=HASH(0x8572848)', 'global/user-error.html.tmpl', 'HASH(0x86850e0)') called at Bugzilla/Error.pm line 42 Bugzilla::Error::ThrowUserError('product_edit_denied', 'HASH(0x86850e0)') called at /usr/local/httpd/htdocs/bugzilla/process_bug.cgi line 1146 Second error: undef error - DBD::mysql::st execute failed: Table 'namedqueries' was not locked with LOCK TABLES [for Statement " SELECT name, query, linkinfooter FROM namedqueries WHERE userid=? ORDER BY UPPER(name)"] at Bugzilla/User.pm line 155 Bugzilla::User::queries('Bugzilla::User=HASH(0x86202d0)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Stash.pm line 649 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Stash.pm line 649 Template::Stash::_dotop('Template::Stash=HASH(0x86fbc1c)', 'Bugzilla::User=HASH(0x86202d0)', 'queries', 0) called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Stash.pm line 411 Template::Stash::get('Template::Stash=HASH(0x86fbc1c)', 'ARRAY(0x8727f48)') called at data/template/en/default/global/site-navigation.html.tmpl line 114 eval {...} called at data/template/en/default/global/site-navigation.html.tmpl line 16 Template::Provider::__ANON__('Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 141 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 139 Template::Document::process('Template::Document=HASH(0x8715a30)', 'Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 340 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 320 Template::Context::process('Template::Context=HASH(0x85d67e8)', 'global/site-navigation.html.tmpl') called at data/template/en/default/global/header.html.tmpl line 49 eval {...} called at data/template/en/default/global/header.html.tmpl line 16 Template::Provider::__ANON__('Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 141 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 139 Template::Document::process('Template::Document=HASH(0x87018c4)', 'Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 340 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 320 Template::Context::process('Template::Context=HASH(0x85d67e8)', 'global/header.html.tmpl') called at data/template/en/default/global/code-error.html.tmpl line 844 eval {...} called at data/template/en/default/global/code-error.html.tmpl line 16 Template::Provider::__ANON__('Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 141 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 139 Template::Document::process('Template::Document=HASH(0x8762620)', 'Template::Context=HASH(0x85d67e8)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 340 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 320 Template::Context::process('Template::Context=HASH(0x85d67e8)', 'Template::Document=HASH(0x8762620)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Service.pm line 97 eval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Service.pm line 94 Template::Service::process('Template::Service=HASH(0x85aee78)', 'global/code-error.html.tmpl', 'HASH(0x8573f9c)') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template.pm line 76 Template::process('Bugzilla::Template=HASH(0x8572848)', 'global/code-error.html.tmpl', 'HASH(0x8573f9c)') called at CGI.pl line 294 main::ThrowTemplateError('undef error - DBD::mysql::st execute failed: Table \'namedqueries\' was not locked with LOCK TABLES [for Statement " SELECT name, query, linkinfooter^J FROM namedqueries^J WHERE userid=?^J ORDER BY UPPER(name)"] at Bugzilla/User.pm line 155^J^IBugzilla::User::queries(\'Bugzilla::User=HASH(0x86202d0)\') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Stash.pm line 649^J^Ieval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Stash.pm line 649^J^ITemplate::Stash::_dotop(\'Template::Stash=HASH(0x86831ec)\', \'Bugzilla::User=HASH(0x86202d0)\', \'queries\', 0) called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Stash.pm line 411^J^ITemplate::Stash::get(\'Template::Stash=HASH(0x86831ec)\', \'ARRAY(0x8718924)\') called at data/template/en/default/global/site-navigation.html.tmpl line 114^J^Ieval {...} called at data/template/en/default/global/site-navigation.html.tmpl line 16^J^ITemplate::Provider::__ANON__(\'Template::Context=HASH(0x85d67e8)\') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 141^J^Ieval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 139^J^ITemplate::Document::process(\'Template::Document=HASH(0x8715a30)\', \'Template::Context=HASH(0x85d67e8)\') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 340^J^Ieval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 320^J^ITemplate::Context::process(\'Template::Context=HASH(0x85d67e8)\', \'global/site-navigation.html.tmpl\') called at data/template/en/default/global/header.html.tmpl line 49^J^Ieval {...} called at data/template/en/default/global/header.html.tmpl line 16^J^ITemplate::Provider::__ANON__(\'Template::Context=HASH(0x85d67e8)\') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 141^J^Ieval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 139^J^ITemplate::Document::process(\'Template::Document=HASH(0x87018c4)\', \'Template::Context=HASH(0x85d67e8)\') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 340^J^Ieval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 320^J^ITemplate::Context::process(\'Template::Context=HASH(0x85d67e8)\', \'global/header.html.tmpl\') called at data/template/en/default/global/user-error.html.tmpl line 1759^J^Ieval {...} called at data/template/en/default/global/user-error.html.tmpl line 16^J^ITemplate::Provider::__ANON__(\'Template::Context=HASH(0x85d67e8)\') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 141^J^Ieval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Document.pm line 139^J^ITemplate::Document::process(\'Template::Document=HASH(0x86f51cc)\', \'Template::Context=HASH(0x85d67e8)\') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 340^J^Ieval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Context.pm line 320^J^ITemplate::Context::process(\'Template::Context=HASH(0x85d67e8)\', \'Template::Document=HASH(0x86f51cc)\') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Service.pm line 97^J^Ieval {...} called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template/Service.pm line 94^J^ITemplate::Service::process(\'Template::Service=HASH(0x85aee78)\', \'global/user-error.html.tmpl\', \'HASH(0x86850e0)\') called at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Template.pm line 76^J^ITemplate::process(\'Bugzilla::Template=HASH(0x8572848)\', \'global/user-error.html.tmpl\', \'HASH(0x86850e0)\') called at Bugzilla/Error.pm line 42^J^IBugzilla::Error::ThrowUserError(\'product_edit_denied\', \'HASH(0x86850e0)\') called at /usr/local/httpd/htdocs/bugzilla/process_bug.cgi line 1146^J') called at Bugzilla/Error.pm line 42 Bugzilla::Error::ThrowUserError('product_edit_denied', 'HASH(0x86850e0)') called at /usr/local/httpd/htdocs/bugzilla/process_bug.cgi line 1146
Bugzilla Version: CVSHEAD of 2003-09-11
Keywords: crash
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash
OS: Linux → All
Hardware: PC → All
Summary: crash when a non-privileged user wants to commit a bug change → "Table 'namedqueries' was not locked with LOCK TABLES" on ThrowUserError('product_edit_denied')
Target Milestone: --- → Bugzilla 2.18
Attached patch Patch (obsolete) — Splinter Review
Attachment #131486 - Flags: review?(bbaetz)
Gerv, Should this unlock tables before calling the ThrowUserError function or should ThrowUserError always unlock tables within the function??
The idea was that if you wanted ThrowUserError to unlock tables for you, you passed it a third parameter. So, you could unlock them for yourself, and not pass the parameter - but that's not how things were designed to work. The correct fix is to pass a value, e.g. the string "abort" as used elsewhere in process_bug.cgi, as the third parameter to ThrowUserError(). Gerv
Attachment #131486 - Attachment is obsolete: true
Attachment #131506 - Flags: review?
*** Bug 219346 has been marked as a duplicate of this bug. ***
I can't reproduce this bug without the patch. I have a group set up as outlined, a bug which is a member of that group, and I am not. And I can't even see the bug, let alone edit it. Can you outline the reproduction conditions in more detail? Gerv
I thought I'd seen this before - is this a dupe of bug 211435?
reply to comment #7: I logged in as the 'Reporter' to see the bug. The Reporter is not member of the bugs group.
Attachment #131486 - Flags: review?(bbaetz)
Comment on attachment 131506 [details] [diff] [review] Ver 2 per comment 4 This looks fine, assuming its been tested and all that.
Attachment #131506 - Flags: review? → review+
<-- me (patch writer)
Assignee: myk → jocuri
Flags: approval?
Status: NEW → ASSIGNED
Flags: approval? → approval+
Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.196; previous revision: 1.195 done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Blocks: 276967
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: