--SKIPIF--
<?php
require_once('skipif.inc');
-require_once("connect.inc");
-if ($IS_MYSQLND) {
- die("skip libmysql only test");
-}
require_once('skipifconnectfailure.inc');
?>
--FILE--
printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
}
+if (!$db->query("DROP TABLE IF EXISTS test")) {
+ printf("[002] [%d] %s\n", mysqli_errno($db), mysqli_error($db));
+ die();
+}
+
+if (!$db->query("CREATE TABLE test(str TEXT)")) {
+ printf("[003] [%d] %s\n", mysqli_errno($db), mysqli_error($db));
+ die();
+}
+
+if (!$db->query("INSERT INTO test(str) VALUES ('Test')")) {
+ printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ die();
+}
+
$stmt = $db->stmt_init();
-$stmt->prepare("SELECT User FROM user WHERE password=\"\"");
+if (!$stmt->prepare("SELECT str FROM test")) {
+ printf("[004] [%d] %s\n", mysqli_errno($db), mysqli_error($db));
+ die();
+}
+
$stmt->execute();
$stmt->bind_result($testArg);
echo "Okey";
?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
--EXPECT--
Okey
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (PHP_INT_SIZE != 8) die('skip requires 64-bit');
+if (!defined('MYSQLI_OPT_INT_AND_FLOAT_NATIVE')) die('skip requires mysqlnd');
?>
--FILE--
<?php
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
+if (!defined('MYSQLI_STORE_RESULT_COPY_DATA')) die('skip requires mysqlnd');
?>
--FILE--
<?php
mysqli object is already closed
Property access is not allowed yet
Property access is not allowed yet
-mysqli->client_version = '80000'/integer
+mysqli->client_version = '%d'/integer
mysqli object is already closed
mysqli object is already closed
mysqli object is already closed
mysqli object is already closed
Property access is not allowed yet
Property access is not allowed yet
-mysqli->client_version = '80000'/integer
+mysqli->client_version = '%d'/integer
mysqli object is already closed
mysqli object is already closed
mysqli object is already closed
["connect_error"]=>
NULL
["errno"]=>
- int(2006)
+ int(%d)
["error"]=>
string(%d) "%s"
["error_list"]=>
[0]=>
array(3) {
["errno"]=>
- int(2006)
+ int(%d)
["sqlstate"]=>
string(5) "%s"
["error"]=>
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
+if (!defined('MYSQLI_STORE_RESULT_COPY_DATA')) {
+ die("skip Requires MYSQLI_STORE_RESULT_COPY_DATA");
+}
?>
---INI--
-mysqlnd.debug="d:t:O,{TMP}/mysqlnd.trace"
--FILE--
<?php
require_once("connect.inc");
} catch (PDOException $e) {
$expected = array(
"SQLSTATE[HY000] [1049] Unknown database 'letshopeinvalid'",
+ "SQLSTATE[42000] [1049] Unknown database 'letshopeinvalid'",
"SQLSTATE[HY000] [2002] No such file or directory"
);
printf("[003] URI=%s, DSN=%s, File=%s (%d bytes, '%s'), chr(0) test, %s\n",
"MYSQL_ATTR_SSL_CIPHER" => true,
"MYSQL_ATTR_COMPRESS" => true,
"MYSQL_ATTR_MULTI_STATEMENTS" => true,
- "MYSQL_ATTR_SSL_VERIFY_SERVER_CERT" => true,
);
if (!MySQLPDOTest::isPDOMySQLnd()) {
}
if (extension_loaded('mysqlnd')) {
+ $expected['MYSQL_ATTR_SSL_VERIFY_SERVER_CERT'] = true;
$expected['MYSQL_ATTR_SERVER_PUBLIC_KEY'] = true;
} else if (extension_loaded('mysqli')) {
if (mysqli_get_client_version() > 50605) {