summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@sun.com>2010-02-10 12:12:55 +0000
committerLuis Soares <luis.soares@sun.com>2010-02-10 12:12:55 +0000
commit5df69267c25d093fb1a87b3e9952812a66f0f687 (patch)
tree91fc6c7d7fce90648e2bd80782c155c891cbdd9f
parentdca6700620d5f4b325c3aadbbf5ab30c5b888a8c (diff)
downloadmariadb-git-5df69267c25d093fb1a87b3e9952812a66f0f687.tar.gz
BUG#50984: check_testcase fails for rpl_tmp_table_and_DDL
We found that there are some tests that are not cleaning up properly: 1. rpl_tmp_table_and_DDL 2. rpl_do_grant 3. rpl_sync For #1 and #2 we found that the slave would not, for some cases, replicate all the instructions the master processed in the cleanup section. We fix these by deploying some synchronization commands in the test cases so that slave processes all clean up instructions. As for #3, this is tracked as part of another bug (BUG@50442).
-rw-r--r--mysql-test/suite/rpl/r/rpl_do_grant.result10
-rw-r--r--mysql-test/suite/rpl/t/rpl_do_grant.test18
-rw-r--r--mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test1
3 files changed, 22 insertions, 7 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result
index 65c60acc651..9eecc1bab3f 100644
--- a/mysql-test/suite/rpl/r/rpl_do_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_do_grant.result
@@ -89,6 +89,7 @@ show grants for rpl_do_grant2@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
show grants for rpl_do_grant2@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
+call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
DROP DATABASE IF EXISTS bug42217_db;
CREATE DATABASE bug42217_db;
GRANT CREATE ROUTINE ON bug42217_db.* TO 'create_rout_db'@'localhost'
@@ -166,9 +167,12 @@ DROP FUNCTION upgrade_del_func;
DROP FUNCTION upgrade_alter_func;
DROP DATABASE bug42217_db;
DROP USER 'create_rout_db'@'localhost';
-call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
-USE mtr;
-call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
######## BUG#49119 #######
### i) test case from the 'how to repeat section'
stop slave;
diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test
index d6a06f43d18..df61b6847c9 100644
--- a/mysql-test/suite/rpl/t/rpl_do_grant.test
+++ b/mysql-test/suite/rpl/t/rpl_do_grant.test
@@ -120,6 +120,9 @@ show grants for rpl_do_grant2@localhost;
# BUG42217 mysql.procs_priv does not get replicated
#####################################################
connection master;
+call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
+sync_slave_with_master;
+connection master;
--disable_warnings
DROP DATABASE IF EXISTS bug42217_db;
@@ -209,12 +212,19 @@ USE bug42217_db;
DROP FUNCTION upgrade_del_func;
DROP FUNCTION upgrade_alter_func;
DROP DATABASE bug42217_db;
+-- sync_slave_with_master
+-- connection master
+
+# user was already dropped in the slave before
+# so no need to wait for the slave to replicate
+# this statement (if it did and we later synced
+# the slave it would end up in an error anyway)
DROP USER 'create_rout_db'@'localhost';
-call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
-connection slave;
-USE mtr;
-call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
+# finish entire clean up (remove binlogs)
+# so that we leave a pristine environment for the
+# following tests
+-- source include/master-slave-reset.inc
# BUG#49119: Master crashes when executing 'REVOKE ... ON
# {PROCEDURE|FUNCTION} FROM ...'
diff --git a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test
index 56924a2efe9..b3efb578b68 100644
--- a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test
+++ b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test
@@ -10,4 +10,5 @@ source include/have_binlog_format_row.inc;
LET $ENGINE_TYPE= MyISAM;
source extra/rpl_tests/rpl_tmp_table_and_DDL.test;
+sync_slave_with_master;