Skip to content

Commit eb4e369

Browse files
committed
Check max_allowed_packet size
1 parent 70c4536 commit eb4e369

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

ext/mysqli/tests/mysqli_real_connect_compression_error.phpt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ Bug #80107 mysqli_query() fails for ~16 MB long query when compression is enable
44
<?php
55
require_once('skipif.inc');
66
require_once('skipifemb.inc');
7-
require_once('skipifconnectfailure.inc');
7+
require_once("connect.inc");
8+
$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
9+
if (!$link) {
10+
die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
11+
}
12+
$result = $link->query("SHOW VARIABLES LIKE 'max_allowed_packet'");
13+
if ($result->fetch_assoc()['Value'] < 0xffffff) {
14+
die('skip max_allowed_packet is less than 0xffffff');
15+
}
816
?>
9-
--INI--
10-
mysqli.allow_local_infile=1
1117
--FILE--
1218
<?php
1319

0 commit comments

Comments
 (0)