Debian Codegraph @

mysql-test/suite/engines/funcs/t/rpl_row_stop_middle.test

raw
1 # Test for BUG#11729: see if, when STOP SLAVE occurs while the slave
2 # SQL thread has processed a Table_map_log_event but has not processed
3 # the last Rows_log_event associated to it, the slave thread does not
4 # forget to close its tables.
5
6 # Can be run with statement-based but no interest (and long test)
7 --source include/have_binlog_format_row.inc
8 --source include/master-slave.inc
9
10 connection master;
11 create table t1 (a int not null auto_increment primary key, b int, key(b));
12 --sync_slave_with_master
13 --source include/stop_slave.inc
14 connection master;
15 INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
16 INSERT INTO t1 (a) SELECT null FROM t1;
17 INSERT INTO t1 (a) SELECT null FROM t1;
18 INSERT INTO t1 (a) SELECT null FROM t1;
19 INSERT INTO t1 (a) SELECT null FROM t1;
20 INSERT INTO t1 (a) SELECT null FROM t1;
21 INSERT INTO t1 (a) SELECT null FROM t1;
22 INSERT INTO t1 (a) SELECT null FROM t1;
23 INSERT INTO t1 (a) SELECT null FROM t1;
24 INSERT INTO t1 (a) SELECT null FROM t1;
25 INSERT INTO t1 (a) SELECT null FROM t1;
26 INSERT INTO t1 (a) SELECT null FROM t1;
27 INSERT INTO t1 (a) SELECT null FROM t1;
28 INSERT INTO t1 (a) SELECT null FROM t1;
29
30 connection slave;
31 --source include/start_slave.inc
32
33 # hope one second is not enough for slave to reach the last
34 # Rows_log_event, so that test actually tests something.
35
36 real_sleep 1;
37 --source include/stop_slave.inc
38
39 # see if slave hangs on DROP TABLE
40
41 drop table t1;
42
43 connection master; # cleanup
44 drop table t1;