Commit 969939e8 authored by Sachin's avatar Sachin

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.
parent a8227a15
...@@ -14,7 +14,7 @@ connection slave; ...@@ -14,7 +14,7 @@ connection slave;
sync_with_master; sync_with_master;
STOP SLAVE; STOP SLAVE;
connection master; connection master;
SET PASSWORD FOR root@"localhost" = PASSWORD('foo'); UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
connection slave; connection slave;
START SLAVE; START SLAVE;
connection master; connection master;
...@@ -22,7 +22,7 @@ connection master; ...@@ -22,7 +22,7 @@ connection master;
# Give slave time to do at last one failed connect retry # Give slave time to do at last one failed connect retry
# This one must be short so that the slave will not stop retrying # This one must be short so that the slave will not stop retrying
real_sleep 2; real_sleep 2;
SET PASSWORD FOR root@"localhost" = PASSWORD(''); UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
# Give slave time to connect (will retry every second) # Give slave time to connect (will retry every second)
sleep 2; sleep 2;
......
...@@ -18,11 +18,11 @@ Ababa ...@@ -18,11 +18,11 @@ Ababa
connection slave; connection slave;
STOP SLAVE; STOP SLAVE;
connection master; connection master;
SET PASSWORD FOR root@"localhost" = PASSWORD('foo'); UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
connection slave; connection slave;
START SLAVE; START SLAVE;
connection master; connection master;
SET PASSWORD FOR root@"localhost" = PASSWORD(''); UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
CREATE TABLE t3(n INT); CREATE TABLE t3(n INT);
INSERT INTO t3 VALUES(1),(2); INSERT INTO t3 VALUES(1),(2);
connection slave; connection slave;
......
...@@ -19,11 +19,11 @@ abandons ...@@ -19,11 +19,11 @@ abandons
connection slave; connection slave;
stop slave; stop slave;
connection master; connection master;
set password for root@"localhost" = password('foo'); UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
connection slave; connection slave;
start slave; start slave;
connection master; connection master;
set password for root@"localhost" = password(''); UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
create table t3(n int); create table t3(n int);
insert into t3 values(1),(2); insert into t3 values(1),(2);
connection slave; connection slave;
......
...@@ -19,7 +19,7 @@ select * from t1 limit 10; ...@@ -19,7 +19,7 @@ select * from t1 limit 10;
sync_slave_with_master; sync_slave_with_master;
stop slave; stop slave;
connection master; connection master;
set password for root@"localhost" = password('foo'); UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
connection slave; connection slave;
start slave; start slave;
connection master; connection master;
...@@ -27,7 +27,7 @@ connection master; ...@@ -27,7 +27,7 @@ connection master;
# Give slave time to do at last one failed connect retry # Give slave time to do at last one failed connect retry
# This one must be short so that the slave will not stop retrying # This one must be short so that the slave will not stop retrying
real_sleep 2; real_sleep 2;
set password for root@"localhost" = password(''); UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
# Give slave time to connect (will retry every second) # Give slave time to connect (will retry every second)
sleep 2; sleep 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment