Annotation of embedaddon/php/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: mysqlnd.net_read_timeout = 0
        !             3: --SKIPIF--
        !             4: <?php
        !             5: require_once('skipif.inc');
        !             6: require_once('skipifemb.inc');
        !             7: require_once('skipifconnectfailure.inc');
        !             8: 
        !             9: if (!$IS_MYSQLND) {
        !            10:        die("skip: test applies only to mysqlnd");
        !            11: }
        !            12: 
        !            13: if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
        !            14:        die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
        !            15: }
        !            16: if (mysqli_get_server_version($link) <= 50011) {
        !            17:        die(sprintf('skip Needs MySQL 5.0.12+, found version %d.', mysqli_get_server_version($link)));
        !            18: }
        !            19: ?>
        !            20: --INI--
        !            21: default_socket_timeout=10
        !            22: max_execution_time=10
        !            23: mysqlnd.net_read_timeout=0
        !            24: --FILE--
        !            25: <?php
        !            26:        include ("connect.inc");
        !            27: 
        !            28:        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
        !            29:                printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
        !            30:        }
        !            31: 
        !            32:        if (!$res = mysqli_query($link, "SELECT SLEEP(2)"))
        !            33:                printf("[002] [%d] %s\n",  mysqli_errno($link), mysqli_error($link));
        !            34: 
        !            35:        var_dump($res->fetch_assoc());
        !            36: 
        !            37:        mysqli_free_result($res);
        !            38:        mysqli_close($link);
        !            39: 
        !            40:        print "done!";
        !            41: ?>
        !            42: --EXPECTF--
        !            43: array(1) {
        !            44:   [%u|b%"SLEEP(2)"]=>
        !            45:   %unicode|string%(1) "0"
        !            46: }
        !            47: done!

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>