MySQL allows only (max_allow_packet - 3)-bytes queries (thanks to kluvi)
This commit is contained in:
parent
20a65465c6
commit
baf21724cf
|
@ -657,11 +657,10 @@ DROP PROCEDURE adminer_alter;
|
||||||
$s = ($max_packet ? "\n" : " ") . "($s)";
|
$s = ($max_packet ? "\n" : " ") . "($s)";
|
||||||
if (!$buffer) {
|
if (!$buffer) {
|
||||||
$buffer = $insert . $s;
|
$buffer = $insert . $s;
|
||||||
} elseif (strlen($buffer) + 2 + strlen($s) < $max_packet) { // 2 - separator and terminator length
|
} elseif (strlen($buffer) + 4 + strlen($s) < $max_packet) { // 4 - length specification
|
||||||
$buffer .= ",$s";
|
$buffer .= ",$s";
|
||||||
} else {
|
} else {
|
||||||
$buffer .= ";\n";
|
echo "$buffer;\n";
|
||||||
echo $buffer;
|
|
||||||
$buffer = $insert . $s;
|
$buffer = $insert . $s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue