xref: /PHP-5.4/ext/mysqli/tests/bug63398.phpt (revision 06739a1b)
1--TEST--
2Bug #63398 (Segfault when polling closed link)
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once("connect.inc");
7if (!$IS_MYSQLND) {
8    die("skip mysqlnd only test");
9}
10require_once('skipifconnectfailure.inc');
11?>
12--FILE--
13<?php
14require 'connect.inc';
15$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
16
17mysqli_close($link);
18
19$read = $error = $reject = array();
20$read[] = $error[] = $reject[] = $link;
21
22mysqli_poll($read, $error, $reject, 1);
23
24echo "okey";
25?>
26--EXPECTF--
27Warning: mysqli_poll(): [1] Couldn't fetch mysqli in %sbug63398.php on line %d
28
29Warning: mysqli_poll(): [1] Couldn't fetch mysqli in %sbug63398.php on line %d
30
31Warning: mysqli_poll(): No stream arrays were passed in %sbug63398.php on line %d
32
33Warning: mysqli_poll(): [1] Couldn't fetch mysqli in %sbug63398.php on line %d
34
35Warning: mysqli_poll(): [1] Couldn't fetch mysqli in %sbug63398.php on line %d
36okey
37