if (mysqli_get_server_version($link) < 50600)
die("SKIP For MySQL >= 5.6.0");
+
+if (mysqli_get_server_version($link) >= 10_00_00)
+ die("SKIP Not applicable for MariaDB");
?>
--FILE--
<?php
die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket));
-if (mysqli_get_server_version($link) >= 50600)
+if (mysqli_get_server_version($link) >= 50600 && mysqli_get_server_version($link) < 10_00_00)
die("SKIP For MySQL < 5.6.0");
?>
--FILE--
mysqli_close($link);
- if (false !== ($tmp = @mysqli_change_user($link, $user, $passwd, $db)))
- printf("[026] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
+ try {
+ mysqli_change_user($link, $user, $passwd, $db);
+ } catch (Error $exception) {
+ echo $exception->getMessage() . "\n";
+ }
print "done!";
?>
--EXPECT--
+mysqli object is already closed
done!
[3] => 2
)
-Warning: PDOStatement::execute(): SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'true' for column 'some_bool_1' at row 1 in %s
+Warning: PDOStatement::execute(): SQLSTATE[%s]: %s: 1366 Incorrect integer value: 'true' for column %s at row 1 in %s
array(3) {
[0]=>
- string(5) "HY000"
+ string(5) "%s"
[1]=>
int(1366)
[2]=>
- string(65) "Incorrect integer value: 'true' for column 'some_bool_1' at row 1"
+ string(%d) "Incorrect integer value: 'true' for column %s at row 1"
}
Array
(
}
}
-Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO %s(id) VALUES (3)' at line 1 in %s on line %d
+Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'INSERT INTO %s(id) VALUES (3)' at line 1 in %s on line %d
bool(false)
string(5) "42000"
array(2) {
}
bool(false)
-Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO test (id, label) VALUES (99, 'x')' at line 1 in %s on line %d
+Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'INSERT INTO test (id, label) VALUES (99, 'x')' at line 1 in %s on line %d
string(5) "42000"
Testing with PDO::MYSQL_ATTR_MULTI_STATEMENTS set to true