diff --git a/export.inc.php b/export.inc.php index bc152a90..b7ecb15e 100644 --- a/export.inc.php +++ b/export.inc.php @@ -31,7 +31,7 @@ function dump_table($table, $style, $is_view = false) { $row_size += 5 + ($field["length"] ? $field["length"] : $type) * (preg_match('~char|text|enum~', $field["type"]) ? 3 : 1); // UTF-8 in MySQL uses up to 3 bytes } if ($row_size > $max_packet) { - $max_packet = 1024 * ceil($row_size / 1024); + $max_packet = min(1073741824, 1024 * ceil($row_size / 1024)); echo "SET max_allowed_packet = $max_packet, GLOBAL max_allowed_packet = $max_packet;\n"; } }