diff options
author | Sachin <sachin.setiya@mariadb.com> | 2018-07-25 12:54:37 +0530 |
---|---|---|
committer | Sachin <sachin.setiya@mariadb.com> | 2018-07-25 12:54:37 +0530 |
commit | 969939e89c29bb3f3d91f8b4ab539601b5daa4d8 (patch) | |
tree | a17ae72de40a8e511588588eb7adcedd20a69da3 | |
parent | a8227a154306a818685ab291f1715c3971d03099 (diff) | |
download | mariadb-git-969939e89c29bb3f3d91f8b4ab539601b5daa4d8.tar.gz |
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.
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_row_001.test | 4 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_row_001.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_stm_000001.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_stm_000001.test | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_row_001.test b/mysql-test/extra/rpl_tests/rpl_row_001.test index 8eb684e0dff..2706336bdea 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_001.test +++ b/mysql-test/extra/rpl_tests/rpl_row_001.test @@ -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; diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result index 94985548f59..3ca694a8e76 100644 --- a/mysql-test/suite/rpl/r/rpl_row_001.result +++ b/mysql-test/suite/rpl/r/rpl_row_001.result @@ -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; diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result index 5680d22f233..0b9ed6fc09c 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_000001.result +++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result @@ -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; diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test index 7e8f669ff34..119fd6168e0 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_000001.test +++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test @@ -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; |