-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ext/mysqlnd: fixed known issues and added test case
- Loading branch information
Showing
4 changed files
with
44 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--TEST-- | ||
Bug #81335: Packets out of order after connection timeout | ||
--EXTENSIONS-- | ||
mysqli | ||
--SKIPIF-- | ||
<?php | ||
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); | ||
|
||
if (!defined('MYSQLI_STORE_RESULT_COPY_DATA')) die('skip requires mysqlnd'); | ||
|
||
require_once 'connect.inc'; | ||
if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip cannot connect"); | ||
if (mysqli_get_server_version($link) < 80024) { | ||
$link->close(); | ||
die("skip: Due to many MySQL Server differences, the test requires >= 8.0.24"); | ||
} | ||
$link->close(); | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
require_once 'connect.inc'; | ||
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); | ||
$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); | ||
$mysqli->query('SET WAIT_TIMEOUT=1'); | ||
usleep(1000000 * 1.1); | ||
try { | ||
$mysqli->query('SELECT SLEEP(1)'); | ||
} catch(mysqli_sql_exception $e) { | ||
echo $e->getMessage(); | ||
echo "\n"; | ||
echo $e->getCode(); | ||
} | ||
$mysqli->close(); | ||
?> | ||
--EXPECTF-- | ||
The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior. | ||
4031 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters