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;
sync_with_master;
STOP SLAVE;
connection master;
SET PASSWORD FOR root@"localhost" = PASSWORD('foo');
UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
connection slave;
START SLAVE;
connection master;
......@@ -22,7 +22,7 @@ connection master;
# Give slave time to do at last one failed connect retry
# This one must be short so that the slave will not stop retrying
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)
sleep 2;
......
......@@ -18,11 +18,11 @@ Ababa
connection slave;
STOP SLAVE;
connection master;
SET PASSWORD FOR root@"localhost" = PASSWORD('foo');
UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
connection slave;
START SLAVE;
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);
INSERT INTO t3 VALUES(1),(2);
connection slave;
......
......@@ -19,11 +19,11 @@ abandons
connection slave;
stop slave;
connection master;
set password for root@"localhost" = password('foo');
UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
connection slave;
start slave;
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);
insert into t3 values(1),(2);
connection slave;
......
......@@ -19,7 +19,7 @@ select * from t1 limit 10;
sync_slave_with_master;
stop slave;
connection master;
set password for root@"localhost" = password('foo');
UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
connection slave;
start slave;
connection master;
......@@ -27,7 +27,7 @@ connection master;
# Give slave time to do at last one failed connect retry
# This one must be short so that the slave will not stop retrying
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)
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