summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@sun.com>2009-09-13 22:43:47 +0100
committerLuis Soares <luis.soares@sun.com>2009-09-13 22:43:47 +0100
commit09f07bc1107c0facc32c16c58bae0215ce08eeea (patch)
tree653c233b038590bd31a8d527ed459f4858c4be6a /mysql-test
parent4cce928ea662ca77875954cb1c7725cdeb4df3eb (diff)
downloadmariadb-git-09f07bc1107c0facc32c16c58bae0215ce08eeea.tar.gz
BUG#47016: rpl_do_grant fails on PB-2 with a failing connect
The test case rpl_do_grant fails sporadically on PB2 with "Access denied for user 'create_rout_db'@'localhost' ...". Inspecting the test case, one may find that if issues a GRANT on the master connection and immediately after it creates two new connections (one to the master and one to the slave) using the credentials set with the GRANT. Unfortunately, there is no synchronization between master and slave after the grant and before the connections are established. This can result in slave not having executed the GRANT by the time the connection is attempted. This patch fixes this by deploying a sync_slave_with_master between the grant and the connections attempt.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_do_grant.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test
index 806de780086..fc793c03649 100644
--- a/mysql-test/suite/rpl/t/rpl_do_grant.test
+++ b/mysql-test/suite/rpl/t/rpl_do_grant.test
@@ -129,6 +129,9 @@ CREATE DATABASE bug42217_db;
GRANT CREATE ROUTINE ON bug42217_db.* TO 'create_rout_db'@'localhost'
IDENTIFIED BY 'create_rout_db' WITH GRANT OPTION;
+-- sync_slave_with_master
+-- connection master
+
connect (create_rout_db_master, localhost, create_rout_db, create_rout_db, bug42217_db,$MASTER_MYPORT,);
connect (create_rout_db_slave, localhost, create_rout_db, create_rout_db, bug42217_db, $SLAVE_MYPORT,);