--- /dev/null
+--TEST--
+Bug #32405
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+ include ("connect.inc");
+
+ class my_stmt extends mysqli_stmt
+ {
+ public function __construct($link, $query) {
+ parent::__construct($link, $query);
+ }
+ }
+
+ class my_result extends mysqli_result
+ {
+ public function __construct($link, $query) {
+ parent::__construct($link, $query);
+ }
+ }
+
+ /*** test mysqli_connect 127.0.0.1 ***/
+ $link = mysqli_connect($host, $user, $passwd);
+ mysqli_query($link, "SET sql_mode=''");
+
+ $stmt = new my_stmt($link, "SELECT 'foo' FROM DUAL");
+
+ $stmt->execute();
+ $stmt->bind_result($var);
+ $stmt->fetch();
+
+ $stmt->close();
+ var_dump($var);
+
+ mysqli_real_query($link, "SELECT 'bar' FROM DUAL");
+ $result = new my_result($link, MYSQLI_STORE_RESULT);
+ $row = $result->fetch_row();
+ $result->close();
+
+ var_dump($row[0]);
+
+ mysqli_close($link);
+?>
+--EXPECT--
+string(3) "foo"
+string(3) "bar"
--- /dev/null
+--TEST--
+bug #36745 : LOAD DATA LOCAL INFILE doesn't return correct error message
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+ include ("connect.inc");
+
+ /*** test mysqli_connect 127.0.0.1 ***/
+ $mysql = mysqli_connect($host, $user, $passwd, "test");
+
+ $mysql->query("DROP TABLE IF EXISTS litest");
+ $mysql->query("CREATE TABLE litest (a VARCHAR(20))");
+
+ $mysql->query("LOAD DATA LOCAL INFILE 'filenotfound' INTO TABLE litest");
+ var_dump($mysql->error);
+
+ $mysql->close();
+ printf("Done");
+?>
+--EXPECT--
+string(31) "Can't find file 'filenotfound'."
+Done
--- /dev/null
+--TEST--
+bug #36802 : crashes with mysql_init
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+ class my_mysqli extends mysqli {
+ function __construct()
+ {
+ }
+ }
+
+ include "connect.inc";
+
+
+ $mysql = mysqli_init();
+
+ /* following operations should not work */
+ $x[0] = @$mysql->set_charset('utf8');
+ $x[1] = @$mysql->query("SELECT 'foo' FROM DUAL");
+
+ /* following operations should work */
+ $x[2] = ($mysql->client_version > 0);
+ $x[3] = $mysql->errno;
+ $mysql->close();
+
+
+
+ var_dump($x);
+?>
+--EXPECT--
+array(4) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ bool(true)
+ [3]=>
+ int(0)
+}