php-src/ext/mysqli/tests/bug66762.phpt
Andrey Hristov 63791d055a New result fetching mode for mysqlnd, which should use less memory but
implies more memory copy. The old method is still available and can be used.
It stays as default. Choosing the method is through a flag to mysqli_query()/mysqli_real_query()
New mode can be forced with an INI setting, for all extensions that support this mode
(ext/mysql and mysqli, because PDO due to it's architecture can't support it)
The setting is mysqlnd.fetch_data_copy=[0|1]
2014-04-10 16:44:54 +03:00

27 lines
603 B
PHP

--TEST--
Bug #66762 mysqli@libmysql segfault in mysqli_stmt::bind_result() when link closed
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
require_once("connect.inc");
if (!$mysqli = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
}
$read_stmt = $mysqli->prepare("SELECT 1");
var_dump($read_stmt->bind_result($data));
unset($mysqli);
var_dump($read_stmt->bind_result($data));
?>
done!
--EXPECT--
bool(true)
bool(true)
done!