Skip to content

Commit b0efd18

Browse files
committed
Don't use PASSWORD() function in test
Doesn't exist anymore in MySQL 8.
1 parent 248c783 commit b0efd18

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/mysqli/tests/mysqli_expire_password.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if (!mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO expiretest@'%
9292
printf("[007] Cannot connect [%d] %s\n",
9393
mysqli_connect_errno(), mysqli_connect_error());
9494
} else {
95-
$link->query("SET PASSWORD=PASSWORD('expiretest')");
95+
$link->query("SET PASSWORD='expiretest'");
9696
printf("[008] Connect allowed, pw set, [%d] %s\n", $link->errno, $link->error);
9797
if ($res = $link->query("SELECT id FROM test WHERE id = 1"))
9898
var_dump($res->fetch_assoc());

ext/mysqli/tests/mysqli_pconn_max_links.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ mysqli.rollback_on_cached_plink=1
9292
var_dump($row);
9393

9494
// change the password for the second DB user and kill the persistent connection
95-
if (!mysqli_query($link, 'SET PASSWORD FOR pcontest = PASSWORD("newpass")') ||
95+
if (!mysqli_query($link, 'SET PASSWORD FOR pcontest = "newpass"') ||
9696
!mysqli_query($link, 'FLUSH PRIVILEGES'))
9797
printf("[005] Cannot change PW of second DB user, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
9898

9999
// change the password for the second DB user and kill the persistent connection
100-
if (!mysqli_query($link, 'SET PASSWORD FOR pcontest@localhost = PASSWORD("newpass")') ||
100+
if (!mysqli_query($link, 'SET PASSWORD FOR pcontest@localhost = "newpass"') ||
101101
!mysqli_query($link, 'FLUSH PRIVILEGES'))
102102
printf("[006] Cannot change PW of second DB user, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
103103

0 commit comments

Comments
 (0)