summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/globals.pl b/globals.pl
index 00e1cfd25..702915866 100644
--- a/globals.pl
+++ b/globals.pl
@@ -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);