1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00
Files
archived-php-src/ext/mysqli/tests/bug77597.phpt
T
Nikita Popov 934691fabb Fixed bug #77597
The same variable was reused in two nested loops... The test doesn't
fail on 7.2, but I'm fixing this here anyway as the code is clearly
wrong, and probably erroneous in other situations.
2019-02-21 13:42:47 +01:00

28 lines
612 B
PHP

--TEST--
Bug #77597: mysqli_fetch_field hangs scripts
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
require_once("connect.inc");
$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$mysqli->query('DROP TABLE IF EXISTS a');
$mysqli->query('CREATE TABLE a (b int)');
$mysqli->query('INSERT INTO a VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9)');
$mysqli->real_query("SELECT * FROM a");
$result = $mysqli->store_result(MYSQLI_STORE_RESULT_COPY_DATA);
$field = $result->fetch_field();
var_dump($field->name);
?>
--EXPECT--
string(1) "b"