1--TEST--
2mysqlnd.net_read_timeout limit check
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once 'skipifconnectfailure.inc';
8?>
9--INI--
10default_socket_timeout=60
11max_execution_time=60
12mysqlnd.net_read_timeout=1
13--FILE--
14<?php
15    include 'connect.inc';
16
17    if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
18        printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
19    }
20
21    if (false === mysqli_query($link, "SELECT SLEEP(5)"))
22        printf("[002] [%d] %s\n",  mysqli_errno($link), mysqli_error($link));
23
24    mysqli_close($link);
25
26    print "done!";
27?>
28--EXPECT--
29[002] [2006] MySQL server has gone away
30done!
31