]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Wasn't always tweaking LOCK TABLES commands correctly when shadowing. And finally...
authorterry%mozilla.org <>
Fri, 18 Feb 2000 08:43:56 +0000 (08:43 +0000)
committerterry%mozilla.org <>
Fri, 18 Feb 2000 08:43:56 +0000 (08:43 +0000)
globals.pl

index 00e1cfd25868b3b12e05d6f25f3b31e276d033b3..7029158666f2c037658752c867104896ec993351 100644 (file)
@@ -112,12 +112,12 @@ sub SendSQL {
     if ($iswrite && !$::dbwritesallowed) {
         die "Evil code attempted to write stuff to the shadow database.";
     }
-    if ($str =~ /^LOCK TABLES/ && $str !~ /shadowlog/) {
-        $str =~ s/^LOCK TABLES/LOCK TABLES shadowlog WRITE, /;
+    if ($str =~ /^LOCK TABLES/i && $str !~ /shadowlog/) {
+        $str =~ s/^LOCK TABLES/LOCK TABLES shadowlog WRITE, /i;
     }
     SqlLog($str);
     $::currentquery = $::db->query($str)
-       || die "$str: $::db_errstr";
+       || die "$str: " . $::db->errmsg;
     SqlLog("Done");
     if (!$dontshadow && $iswrite && Param("shadowdb")) {
         my $q = SqlQuote($str);