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