summaryrefslogtreecommitdiff
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
commit63a81c09946be5f008eb3423e24db93dc72a3fe8 (patch)
tree653c233b038590bd31a8d527ed459f4858c4be6a
parent3c916057ad772fe613c294fb654f9a70b65b1b5a (diff)
downloadmariadb-git-63a81c09946be5f008eb3423e24db93dc72a3fe8.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.
-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,);