mirror of
https://github.com/php/php-src.git
synced 2024-10-02 23:36:16 +00:00
63791d055a
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]
27 lines
615 B
PHP
27 lines
615 B
PHP
--TEST--
|
|
Bug #66043 (Segfault calling bind_param() on mysqli)
|
|
--SKIPIF--
|
|
<?php
|
|
require_once('skipif.inc');
|
|
require_once("connect.inc");
|
|
if ($IS_MYSQLND) {
|
|
die("skip libmysql only test");
|
|
}
|
|
require_once('skipifconnectfailure.inc');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
require 'connect.inc';
|
|
if (!$db = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
|
printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
|
|
}
|
|
|
|
$stmt = $db->stmt_init();
|
|
$stmt->prepare("SELECT User FROM user WHERE password=\"\"");
|
|
$stmt->execute();
|
|
$stmt->bind_result($testArg);
|
|
echo "Okey";
|
|
?>
|
|
--EXPECTF--
|
|
Okey
|