1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
Sachin
2018-07-25 12:54:37 +05:30
parent a8227a1543
commit 969939e89c
4 changed files with 8 additions and 8 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;