diff options
Diffstat (limited to 'ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt')
-rw-r--r-- | ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt index b664179265..9b2109d754 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt @@ -54,10 +54,8 @@ if (strlen($row['Value']) != fwrite($fp, $row['Value'])) { 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"); @@ -68,8 +66,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)); } @@ -85,6 +83,7 @@ if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) } $link->close(); +echo "nocache"; ?> --FILE-- <?php |