summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt')
-rw-r--r--ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt
index 86e27fbaff..f67d57ca75 100644
--- a/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt
+++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt
@@ -57,10 +57,8 @@ if (strlen($key) != fwrite($fp, $key)) {
die(sprintf("skip Failed to create pub key file"));
}
-
-if (!$link->query("SET @@session.old_passwords=2")) {
- die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
-}
+// Ignore errors because this variable exists only in MySQL 5.6 and 5.7
+$link->query("SET @@session.old_passwords=2");
$link->query('DROP USER shatest');
$link->query("DROP USER shatest@localhost");
@@ -71,8 +69,8 @@ if (!$link->query('CREATE USER shatest@"%" IDENTIFIED WITH sha256_password') ||
die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
}
-if (!$link->query('SET PASSWORD FOR shatest@"%" = PASSWORD("shatest")') ||
- !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
+if (!$link->query('SET PASSWORD FOR shatest@"%" = "shatest"') ||
+ !$link->query('SET PASSWORD FOR shatest@"localhost" = "shatest"')) {
die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
}
@@ -88,6 +86,7 @@ if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db))
}
$link->close();
+echo "nocache";
?>
--INI--
mysqlnd.sha256_server_public_key="test_sha256_ini"