Commit f02a1e94 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 57819 - cut down large mysql error strings. Patch by n_hibma@qubesoft.com, r=gerv.

parent 69aa4d37
......@@ -211,8 +211,13 @@ sub SendSQL {
}
SqlLog($str);
$::currentquery = $::db->prepare($str);
$::currentquery->execute
|| die "$str: " . $::db->errstr;
if (!$::currentquery->execute) {
my $errstr = $::db->errstr;
# Cut down the error string to a reasonable.size
$errstr = substr($errstr, 0, 100) . ' ... ' . substr($errstr, -100)
if length($errstr) > 200;
die "$str: " . $errstr;
}
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