php-src/ext/mysqli/tests/bug36420.phpt
Ulf Wendel 974935e6b8 Next set of files which now feature the new environment variable
MYSQL_TEST_SKIP_CONNECT_FAILURE which controls how connection problems
are handled: failure (MYSQL_TEST_SKIP_CONNECT_FAILURE = false, default)
or skip (MYSQL_TEST_SKIP_CONNECT_FAILURE = true)

Also, some minor tweaking of connection parameters in the tests.
2007-08-09 09:43:28 +00:00

29 lines
580 B
PHP

--TEST--
Bug #36420 (segfault when access result->num_rows after calling result->close())
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
$mysqli = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
$result = $mysqli->query('select 1');
$result->close();
echo $result->num_rows;
$mysqli->close();
echo $result->num_rows;
echo "Done\n";
?>
--EXPECTF--
Warning: main(): Couldn't fetch mysqli_result in %s on line %d
Warning: main(): Couldn't fetch mysqli_result in %s on line %d
Done