Performance
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@791 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
31b0572b5d
commit
72313653e8
|
@ -123,14 +123,14 @@ function dump_data($table, $style, $select = "") {
|
||||||
} else {
|
} else {
|
||||||
$s = "\n(" . implode(", ", $row2) . ")";
|
$s = "\n(" . implode(", ", $row2) . ")";
|
||||||
if (!$length) {
|
if (!$length) {
|
||||||
echo $insert, $s; // comma used to save memory
|
echo $insert . $s;
|
||||||
$length = strlen($insert) + strlen($s);
|
$length = strlen($insert) + strlen($s);
|
||||||
} else {
|
} else {
|
||||||
$length += 2 + strlen($s);
|
$length += 2 + strlen($s); // 2 - separator length
|
||||||
if ($length < $max_packet) {
|
if ($length < $max_packet) {
|
||||||
echo ", ", $s;
|
echo ", $s";
|
||||||
} else {
|
} else {
|
||||||
echo ";\n$insert", $s;
|
echo ";\n$insert$s";
|
||||||
$length = strlen($insert) + strlen($s);
|
$length = strlen($insert) + strlen($s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue