If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

RESOLVED FIXED in Bugzilla 2.18

Status

()

Bugzilla
Creating/Changing Bugs
--
blocker
RESOLVED FIXED
14 years ago
5 years ago

People

(Reporter: Thomas Schmidt, Assigned: Vlad Dascalu)

Tracking

unspecified
Bugzilla 2.18
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

14 years ago
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
(Reporter)

Comment 1

14 years ago
Bugzilla Version: CVSHEAD of 2003-09-11 

Updated

14 years ago
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
(Assignee)

Comment 2

14 years ago
Created attachment 131486 [details] [diff] [review]
Patch
(Assignee)

Updated

14 years ago
Attachment #131486 - Flags: review?(bbaetz)

Comment 3

14 years ago
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
(Assignee)

Comment 5

14 years ago
Created attachment 131506 [details] [diff] [review]
Ver 2 per comment 4
Attachment #131486 - Attachment is obsolete: true
(Assignee)

Updated

14 years ago
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?
(Reporter)

Comment 9

14 years ago
reply to comment #7:
I logged in as the 'Reporter' to see the bug. The Reporter is not member of the 
bugs group.

Updated

14 years ago
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+
(Assignee)

Comment 11

14 years ago
<-- me (patch writer)
Assignee: myk → jocuri
Flags: approval?
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
Flags: approval? → approval+
(Assignee)

Comment 12

14 years ago
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
Last Resolved: 14 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.