Commit f229fcf5 authored by terry%mozilla.org's avatar terry%mozilla.org

Wasn't always tweaking LOCK TABLES commands correctly when shadowing. And…

Wasn't always tweaking LOCK TABLES commands correctly when shadowing. And finally fixed it to actually generate useful SQL error messages.
parent 4ff34e9d
......@@ -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);
......
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