Annotation of embedaddon/php/ext/mysqli/tests/bug47050.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #47050 (mysqli_poll() modifies improper variables)
! 3: --SKIPIF--
! 4: <?php
! 5: require_once('skipif.inc');
! 6: require_once('skipifconnectfailure.inc');
! 7: if (!defined("MYSQLI_ASYNC")) {
! 8: die("skip mysqlnd only");
! 9: }
! 10: ?>
! 11: --FILE--
! 12: <?php
! 13: include ("connect.inc");
! 14:
! 15: $link1 = my_mysqli_connect($host, $user, $passwd, null, $port, $socket);
! 16: mysqli_select_db($link1, $db);
! 17:
! 18: $link1->query("SELECT 'test'", MYSQLI_ASYNC);
! 19: $all_links = array($link1);
! 20: $links = $errors = $reject = $all_links;
! 21: mysqli_poll($links, $errors, $reject, 1);
! 22:
! 23: echo "links: ", sizeof($links), "\n";
! 24: echo "errors: ", sizeof($errors), "\n";
! 25: echo "reject: ", sizeof($reject), "\n";
! 26: echo "all_links: ", sizeof($all_links), "\n";
! 27:
! 28: $link1->close();
! 29: ?>
! 30: --EXPECT--
! 31: links: 1
! 32: errors: 0
! 33: reject: 0
! 34: all_links: 1
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>