1--TEST-- 2Bug #77597: mysqli_fetch_field hangs scripts 3--SKIPIF-- 4<?php 5require_once('skipif.inc'); 6require_once('skipifconnectfailure.inc'); 7if (!defined('MYSQLI_STORE_RESULT_COPY_DATA')) die('skip requires mysqlnd'); 8?> 9--FILE-- 10<?php 11 12require_once("connect.inc"); 13$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 14 15$mysqli->query('DROP TABLE IF EXISTS a'); 16$mysqli->query('CREATE TABLE a (b int)'); 17$mysqli->query('INSERT INTO a VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9)'); 18 19$mysqli->real_query("SELECT * FROM a"); 20 21$result = $mysqli->store_result(MYSQLI_STORE_RESULT_COPY_DATA); 22 23$field = $result->fetch_field(); 24var_dump($field->name); 25 26?> 27--EXPECT-- 28string(1) "b" 29