blob: 2c67e64878d61e5ad0f6715feaf263d0798aa46d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
--TEST--
mysqlnd.net_read_timeout > default_socket_timeout
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
?>
--INI--
default_socket_timeout=1
mysqlnd.net_read_timeout=12
max_execution_time=12
--FILE--
<?php
set_time_limit(12);
include ("connect.inc");
if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("[001] Connect failed, [%d] %s\n", mysql_errno(), mysqlerror());
}
if (!$res = mysql_query("SELECT SLEEP(6)", $link))
printf("[002] [%d] %s\n", mysql_errno($link), mysql_error($link));
var_dump(mysql_fetch_assoc($res));
mysql_free_result($res);
mysql_close($link);
print "done!";
?>
--EXPECTF--
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d
array(1) {
[%u|b%"SLEEP(6)"]=>
%unicode|string%(1) "0"
}
done!
|