Skip to content

Commit 21e68e4

Browse files
author
Luis Soares
committed
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).
1 parent 84c205f commit 21e68e4

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

mysql-test/suite/rpl/r/rpl_do_grant.result

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ show grants for rpl_do_grant2@localhost;
8989
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
9090
show grants for rpl_do_grant2@localhost;
9191
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
92+
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
9293
DROP DATABASE IF EXISTS bug42217_db;
9394
CREATE DATABASE bug42217_db;
9495
GRANT CREATE ROUTINE ON bug42217_db.* TO 'create_rout_db'@'localhost'
@@ -166,9 +167,12 @@ DROP FUNCTION upgrade_del_func;
166167
DROP FUNCTION upgrade_alter_func;
167168
DROP DATABASE bug42217_db;
168169
DROP USER 'create_rout_db'@'localhost';
169-
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
170-
USE mtr;
171-
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
170+
stop slave;
171+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
172+
reset master;
173+
reset slave;
174+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
175+
start slave;
172176
######## BUG#49119 #######
173177
### i) test case from the 'how to repeat section'
174178
stop slave;

mysql-test/suite/rpl/t/rpl_do_grant.test

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ show grants for rpl_do_grant2@localhost;
120120
# BUG42217 mysql.procs_priv does not get replicated
121121
#####################################################
122122
connection master;
123+
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
124+
sync_slave_with_master;
125+
connection master;
123126

124127
--disable_warnings
125128
DROP DATABASE IF EXISTS bug42217_db;
@@ -209,12 +212,19 @@ USE bug42217_db;
209212
DROP FUNCTION upgrade_del_func;
210213
DROP FUNCTION upgrade_alter_func;
211214
DROP DATABASE bug42217_db;
215+
-- sync_slave_with_master
216+
-- connection master
217+
218+
# user was already dropped in the slave before
219+
# so no need to wait for the slave to replicate
220+
# this statement (if it did and we later synced
221+
# the slave it would end up in an error anyway)
212222
DROP USER 'create_rout_db'@'localhost';
213223

214-
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
215-
connection slave;
216-
USE mtr;
217-
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
224+
# finish entire clean up (remove binlogs)
225+
# so that we leave a pristine environment for the
226+
# following tests
227+
-- source include/master-slave-reset.inc
218228

219229
# BUG#49119: Master crashes when executing 'REVOKE ... ON
220230
# {PROCEDURE|FUNCTION} FROM ...'

mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ source include/have_binlog_format_row.inc;
1010

1111
LET $ENGINE_TYPE= MyISAM;
1212
source extra/rpl_tests/rpl_tmp_table_and_DDL.test;
13+
sync_slave_with_master;
1314

0 commit comments

Comments
 (0)