]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 95731: "INSERT INTO shadowlog" failed because "Table 'shadowlog' not...
authorjustdave%syndicomm.com <>
Fri, 17 Aug 2001 15:38:54 +0000 (15:38 +0000)
committerjustdave%syndicomm.com <>
Fri, 17 Aug 2001 15:38:54 +0000 (15:38 +0000)
Patch by Myk Melez <myk@mozilla.org>
r= justdave@syndicomm.com

Bugzilla/Token.pm
Token.pm

index 2d5dad2a3331fb282b149ac3d16facdbe6d0372d..185884c98829525b305ad886569c887452ff7c77 100644 (file)
@@ -52,7 +52,7 @@ sub IssuePasswordToken {
     # Generate a unique token and insert it into the tokens table.
     # We have to lock the tokens table before generating the token, 
     # since the database must be queried for token uniqueness.
-    &::SendSQL("LOCK TABLE tokens WRITE");
+    &::SendSQL("LOCK TABLES tokens WRITE");
     my $token = GenerateUniqueToken();
     my $quotedtoken = &::SqlQuote($token);
     my $quotedipaddr = &::SqlQuote($::ENV{'REMOTE_ADDR'});
@@ -166,7 +166,7 @@ Cancelled Because: $cancelaction
     close SENDMAIL;
 
     # Delete the token from the database.
-    &::SendSQL("LOCK TABLE tokens WRITE");
+    &::SendSQL("LOCK TABLES tokens WRITE");
     &::SendSQL("DELETE FROM tokens WHERE token = $quotedtoken");
     &::SendSQL("UNLOCK TABLES");
 }
index 2d5dad2a3331fb282b149ac3d16facdbe6d0372d..185884c98829525b305ad886569c887452ff7c77 100644 (file)
--- a/Token.pm
+++ b/Token.pm
@@ -52,7 +52,7 @@ sub IssuePasswordToken {
     # Generate a unique token and insert it into the tokens table.
     # We have to lock the tokens table before generating the token, 
     # since the database must be queried for token uniqueness.
-    &::SendSQL("LOCK TABLE tokens WRITE");
+    &::SendSQL("LOCK TABLES tokens WRITE");
     my $token = GenerateUniqueToken();
     my $quotedtoken = &::SqlQuote($token);
     my $quotedipaddr = &::SqlQuote($::ENV{'REMOTE_ADDR'});
@@ -166,7 +166,7 @@ Cancelled Because: $cancelaction
     close SENDMAIL;
 
     # Delete the token from the database.
-    &::SendSQL("LOCK TABLE tokens WRITE");
+    &::SendSQL("LOCK TABLES tokens WRITE");
     &::SendSQL("DELETE FROM tokens WHERE token = $quotedtoken");
     &::SendSQL("UNLOCK TABLES");
 }