Skip to content

Commit 969939e

Browse files
MDEV-16821 Set password for user makes rpl test to fail
Actually if we use "set password for " command this changes the checksum of mysql.user table -localhost root Y Y Y Y Y Y Y Y YY Y Y Y Y Y Y Y Y Y Y Y $ Y Y Y Y Y Y Y 0 00 0 N N 0.000000 +localhost root Y Y Y Y Y Y Y Y YY Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 00 0 mysql_native_password N N 0.000000 In short we replace '' with mysql_native_password which make checksum to be different, and hence check test case fails. So we use UPDATE mysql.user command.
1 parent a8227a1 commit 969939e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

mysql-test/extra/rpl_tests/rpl_row_001.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ connection slave;
1414
sync_with_master;
1515
STOP SLAVE;
1616
connection master;
17-
SET PASSWORD FOR root@"localhost" = PASSWORD('foo');
17+
UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
1818
connection slave;
1919
START SLAVE;
2020
connection master;
2121
#
2222
# Give slave time to do at last one failed connect retry
2323
# This one must be short so that the slave will not stop retrying
2424
real_sleep 2;
25-
SET PASSWORD FOR root@"localhost" = PASSWORD('');
25+
UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
2626
# Give slave time to connect (will retry every second)
2727
sleep 2;
2828

mysql-test/suite/rpl/r/rpl_row_001.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Ababa
1818
connection slave;
1919
STOP SLAVE;
2020
connection master;
21-
SET PASSWORD FOR root@"localhost" = PASSWORD('foo');
21+
UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
2222
connection slave;
2323
START SLAVE;
2424
connection master;
25-
SET PASSWORD FOR root@"localhost" = PASSWORD('');
25+
UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
2626
CREATE TABLE t3(n INT);
2727
INSERT INTO t3 VALUES(1),(2);
2828
connection slave;

mysql-test/suite/rpl/r/rpl_stm_000001.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ abandons
1919
connection slave;
2020
stop slave;
2121
connection master;
22-
set password for root@"localhost" = password('foo');
22+
UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
2323
connection slave;
2424
start slave;
2525
connection master;
26-
set password for root@"localhost" = password('');
26+
UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
2727
create table t3(n int);
2828
insert into t3 values(1),(2);
2929
connection slave;

mysql-test/suite/rpl/t/rpl_stm_000001.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ select * from t1 limit 10;
1919
sync_slave_with_master;
2020
stop slave;
2121
connection master;
22-
set password for root@"localhost" = password('foo');
22+
UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
2323
connection slave;
2424
start slave;
2525
connection master;
2626
#
2727
# Give slave time to do at last one failed connect retry
2828
# This one must be short so that the slave will not stop retrying
2929
real_sleep 2;
30-
set password for root@"localhost" = password('');
30+
UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
3131
# Give slave time to connect (will retry every second)
3232
sleep 2;
3333

0 commit comments

Comments
 (0)