]> granicus.if.org Git - php/commitdiff
test for bug #66762
authorRemi Collet <remi@php.net>
Thu, 27 Feb 2014 07:48:01 +0000 (08:48 +0100)
committerRemi Collet <remi@php.net>
Thu, 27 Feb 2014 07:48:01 +0000 (08:48 +0100)
ext/mysqli/tests/bug66762.phpt [new file with mode: 0644]

diff --git a/ext/mysqli/tests/bug66762.phpt b/ext/mysqli/tests/bug66762.phpt
new file mode 100644 (file)
index 0000000..2b8a92c
--- /dev/null
@@ -0,0 +1,26 @@
+--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");
+
+       $mysqli = new mysqli($host, $user, $passwd, $db);
+
+       $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!
\ No newline at end of file