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