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