Closed Bug 211435 Opened 21 years ago Closed 21 years ago

"Table 'namedqueries' was not locked with LOCK TABLES" when updating hours worked

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

2.17.4
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: justdave, Assigned: goobix)

References

()

Details

Attachments

(1 file)

The following was encountered on landfill: (reported by David Edwards)

logged in
loaded bug 1326
updated hours worked to 0.1
did *not* enter a comment
hit commit
recieved the following error:-

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(0x86e5800)') called at
/usr/lib/perl5/site_perl/5.005/Template/Stash.pm line 604 eval {...} called at
/usr/lib/perl5/site_perl/5.005/Template/Stash.pm line 604
Template::Stash::_dotop('Template::Stash=HASH(0x87125b4)','Bugzilla::User=HASH(0x86e5800)','queries',0)
called at /usr/lib/perl5/site_perl/5.005/Template/Stash.pm line 379
Template::Stash::get('Template::Stash=HASH(0x87125b4)','ARRAY(0x87a9ea4)')
called at data/template/en/default/global/useful-links.html.tmpl line 162 eval
{...} called at data/template/en/default/global/useful-links.html.tmpl line 16
Template::Provider::__ANON__('Template::Context=HASH(0x866483c)') called at
/usr/lib/perl5/site_perl/5.005/Template/Document.pm line 144 eval {...} called
at /usr/lib/perl5/site_perl/5.005/Template/Document.pm line 142
Template::Document::process('Template::Document=HASH(0x87c2dac)','Template::Context=HASH(0x866483c)')
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 315 eval {...}
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 295
Template::Context::process('Template::Context=HASH(0x866483c)','global/useful-links.html.tmpl')
called at data/template/en/default/global/footer.html.tmpl line 25 eval {...}
called at data/template/en/default/global/footer.html.tmpl line 16
Template::Provider::__ANON__('Template::Context=HASH(0x866483c)') called at
/usr/lib/perl5/site_perl/5.005/Template/Document.pm line 144 eval {...} called
at /usr/lib/perl5/site_perl/5.005/Template/Document.pm line 142
Template::Document::process('Template::Document=HASH(0x87b2380)','Template::Context=HASH(0x866483c)')
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 315 eval {...}
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 295
Template::Context::process('Template::Context=HASH(0x866483c)','global/footer.html.tmpl')
called at data/template/en/default/global/user-error.html.tmpl line 1223 eval
{...} called at data/template/en/default/global/user-error.html.tmpl line 16
Template::Provider::__ANON__('Template::Context=HASH(0x866483c)') called at
/usr/lib/perl5/site_perl/5.005/Template/Document.pm line 144 eval {...} called
at /usr/lib/perl5/site_perl/5.005/Template/Document.pm line 142
Template::Document::process('Template::Document=HASH(0x8743628)','Template::Context=HASH(0x866483c)')
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 315 eval {...}
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 295
Template::Context::process('Template::Context=HASH(0x866483c)','Template::Document=HASH(0x8743628)')
called at /usr/lib/perl5/site_perl/5.005/Template/Service.pm line 90 eval {...}
called at /usr/lib/perl5/site_perl/5.005/Template/Service.pm line 88
Template::Service::process('Template::Service=HASH(0x85e5fc0)','global/user-error.html.tmpl','HASH(0x8711c6c)')
called at /usr/lib/perl5/site_perl/5.005/Template.pm line 59
Template::process('Bugzilla::Template=HASH(0x860bee0)','global/user-error.html.tmpl','HASH(0x8711c6c)')
called at Bugzilla/Error.pm line 42
Bugzilla::Error::ThrowUserError('comment_required') called at
/var/www/html/bugzilla-tip/process_bug.cgi line 1264
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(0x86e5800)') called at
/usr/lib/perl5/site_perl/5.005/Template/Stash.pm line 604 eval {...} called at
/usr/lib/perl5/site_perl/5.005/Template/Stash.pm line 604
Template::Stash::_dotop('Template::Stash=HASH(0x87440a8)','Bugzilla::User=HASH(0x86e5800)','queries',0)
called at /usr/lib/perl5/site_perl/5.005/Template/Stash.pm line 379
Template::Stash::get('Template::Stash=HASH(0x87440a8)','ARRAY(0x88047e8)')
called at data/template/en/default/global/useful-links.html.tmpl line 162 eval
{...} called at data/template/en/default/global/useful-links.html.tmpl line 16
Template::Provider::__ANON__('Template::Context=HASH(0x866483c)') called at
/usr/lib/perl5/site_perl/5.005/Template/Document.pm line 144 eval {...} called
at /usr/lib/perl5/site_perl/5.005/Template/Document.pm line 142
Template::Document::process('Template::Document=HASH(0x87c2dac)','Template::Context=HASH(0x866483c)')
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 315 eval {...}
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 295
Template::Context::process('Template::Context=HASH(0x866483c)','global/useful-links.html.tmpl')
called at data/template/en/default/global/footer.html.tmpl line 25 eval {...}
called at data/template/en/default/global/footer.html.tmpl line 16
Template::Provider::__ANON__('Template::Context=HASH(0x866483c)') called at
/usr/lib/perl5/site_perl/5.005/Template/Document.pm line 144 eval {...} called
at /usr/lib/perl5/site_perl/5.005/Template/Document.pm line 142
Template::Document::process('Template::Document=HASH(0x87b2380)','Template::Context=HASH(0x866483c)')
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 315 eval {...}
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 295
Template::Context::process('Template::Context=HASH(0x866483c)','global/footer.html.tmpl')
called at data/template/en/default/global/code-error.html.tmpl line 813 eval
{...} called at data/template/en/default/global/code-error.html.tmpl line 16
Template::Provider::__ANON__('Template::Context=HASH(0x866483c)') called at
/usr/lib/perl5/site_perl/5.005/Template/Document.pm line 144 eval {...} called
at /usr/lib/perl5/site_perl/5.005/Template/Document.pm line 142
Template::Document::process('Template::Document=HASH(0x8815814)','Template::Context=HASH(0x866483c)')
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 315 eval {...}
called at /usr/lib/perl5/site_perl/5.005/Template/Context.pm line 295
Template::Context::process('Template::Context=HASH(0x866483c)','Template::Document=HASH(0x8815814)')
called at /usr/lib/perl5/site_perl/5.005/Template/Service.pm line 90 eval {...}
called at /usr/lib/perl5/site_perl/5.005/Template/Service.pm line 88
Template::Service::process('Template::Service=HASH(0x85e5fc0)','global/code-error.html.tmpl','HASH(0x85e5e70)')
called at /usr/lib/perl5/site_perl/5.005/Template.pm line 59
Template::process('Bugzilla::Template=HASH(0x860bee0)','global/code-error.html.tmpl','HASH(0x85e5e70)')
called at CGI.pl line 294
main::ThrowTemplateError('Template::Exception=ARRAY(0x87ad1e8)') called at
Bugzilla/Error.pm line 42 Bugzilla::Error::ThrowUserError('comment_required')
called at /var/www/html/bugzilla-tip/process_bug.cgi line 1264 

Note the call to ThrowUserError...  Looks like the tables were locked already
and didn't get unlocked prior to throwing the error...
/var/www/html/bugzilla-tip/process_bug.cgi line 1264 needs to have unlocked first.
if you're looking for something that might be easy to patch...
Patch.
Attachment #128008 - Flags: review?(kiko)
Attachment #128008 - Flags: review?(kiko) → review?(bbaetz)
Attachment #128008 - Flags: review?(bbaetz) → review+
Flags: approval?
Flags: approval? → approval+
Target Milestone: --- → Bugzilla 2.18
-> patch author for checkin.
Assignee: bbaetz → jocuri
Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v  <--  process_bug.cgi
new revision: 1.188; previous revision: 1.187
done
Status: NEW → ASSIGNED
This bug has a reviewed, approved patch which has been checked in to cvs --
should it be resolved as fixed?
Yes.  JayPee forgot. :)
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Hmm...

I remember JayPee asking if the 2.16 branch has this problem and if a patch 
should be commited to that branch as well... That's why I haven't marked the 
bug as been fixed.
2.16 doesn't have an "hours worked" field.  That was added in 2.17.1 or thereabouts.
That's good to know. :) Thanks.
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: