xref: /PHP-7.3/ext/mysqli/tests/bug66762.phpt (revision b746e698)
1--TEST--
2Bug #66762 	mysqli@libmysql segfault in mysqli_stmt::bind_result() when link closed
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10	require_once("connect.inc");
11
12	if (!$mysqli = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
13		printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
14	}
15
16	$read_stmt = $mysqli->prepare("SELECT 1");
17
18	var_dump($read_stmt->bind_result($data));
19
20	unset($mysqli);
21	var_dump($read_stmt->bind_result($data));
22?>
23done!
24--EXPECT--
25bool(true)
26bool(true)
27done!
28