Commit 491f40fc authored by jocuri%softhome.net's avatar jocuri%softhome.net

Bug 218977: "Table 'namedqueries' was not locked with LOCK TABLES" on…

Bug 218977: "Table 'namedqueries' was not locked with LOCK TABLES" on ThrowUserError('product_edit_denied'); r=bbaetz; a=justdave.
parent 1fb505eb
...@@ -1143,7 +1143,7 @@ foreach my $id (@idlist) { ...@@ -1143,7 +1143,7 @@ foreach my $id (@idlist) {
$oldhash{'product'} = get_product_name($oldhash{'product_id'}); $oldhash{'product'} = get_product_name($oldhash{'product_id'});
if (!CanEditProductId($oldhash{'product_id'})) { if (!CanEditProductId($oldhash{'product_id'})) {
ThrowUserError("product_edit_denied", ThrowUserError("product_edit_denied",
{ product => $oldhash{'product'} }); { product => $oldhash{'product'} }, "abort");
} }
if (defined $::FORM{'product'} if (defined $::FORM{'product'}
...@@ -1151,7 +1151,7 @@ foreach my $id (@idlist) { ...@@ -1151,7 +1151,7 @@ foreach my $id (@idlist) {
&& $::FORM{'product'} ne $oldhash{'product'} && $::FORM{'product'} ne $oldhash{'product'}
&& !CanEnterProduct($::FORM{'product'})) { && !CanEnterProduct($::FORM{'product'})) {
ThrowUserError("entry_access_denied", ThrowUserError("entry_access_denied",
{ product => $::FORM{'product'} }); { product => $::FORM{'product'} }, "abort");
} }
if ($requiremilestone) { if ($requiremilestone) {
my $value = $::FORM{'target_milestone'}; my $value = $::FORM{'target_milestone'};
...@@ -1161,7 +1161,6 @@ foreach my $id (@idlist) { ...@@ -1161,7 +1161,6 @@ foreach my $id (@idlist) {
SendSQL("SELECT defaultmilestone FROM products WHERE name = " . SendSQL("SELECT defaultmilestone FROM products WHERE name = " .
SqlQuote($oldhash{'product'})); SqlQuote($oldhash{'product'}));
if ($value eq FetchOneColumn()) { if ($value eq FetchOneColumn()) {
SendSQL("UNLOCK TABLES");
ThrowUserError("milestone_required", ThrowUserError("milestone_required",
{ bug_id => $id }, { bug_id => $id },
"abort"); "abort");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment