1--TEST-- 2Bug #47050 (mysqli_poll() modifies improper variables) 3--SKIPIF-- 4<?php 5require_once('skipif.inc'); 6require_once('skipifconnectfailure.inc'); 7if (!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-- 31links: 1 32errors: 0 33reject: 0 34all_links: 1 35