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