Debian Codegraph @

mysql-test/suite/rpl_nogtid/t/rpl_stop_slave.test

raw
1 #Want to skip this test from daily Valgrind execution
2 --source include/no_valgrind_without_big.inc
3
4 # Needed because test uses CREATE TEMPORARY/DROP TEMPORARY inside transaction
5 source include/master-slave.inc;
6 source include/have_debug.inc;
7 source include/have_debug_sync.inc;
8 # 72475 renders this case irrelevant for mixed mode as temp tables are no
9 # longer replicated to the slave.
10 source include/have_binlog_format_statement.inc;
11
12 --echo
13 --echo # BUG#56118 STOP SLAVE does not wait till trx with CREATE TMP TABLE ends
14 --echo #
15 --echo # If a temporary table is created or dropped, the transaction should be
16 --echo # regarded similarly that a non-transactional table is modified. So
17 --echo # STOP SLAVE should wait until the transaction has finished.
18
19 CREATE TABLE t1(c1 INT) ENGINE=InnoDB;
20 CREATE TABLE t2(c1 INT) ENGINE=InnoDB;
21
22 --source include/sync_slave_sql_with_master.inc
23 SET DEBUG_SYNC= 'RESET';
24 source include/stop_slave.inc;
25
26 --echo
27 --echo # Suspend the INSERT statement in current transaction on SQL thread.
28 --echo # It guarantees that SQL thread is applying the transaction when
29 --echo # STOP SLAVE command launchs.
30 SET GLOBAL debug= '+d,after_mysql_insert';
31 source include/start_slave.inc;
32
33 --echo
34 --echo # CREATE TEMPORARY TABLE with InnoDB engine
35 --echo # -----------------------------------------
36 let $tmp_table_stm= CREATE TEMPORARY TABLE tt1(c1 INT) ENGINE = InnoDB;
37 source extra/rpl_tests/rpl_stop_slave.test;
38
39 --echo
40 --echo # CREATE TEMPORARY TABLE ... SELECT with InnoDB engine
41 --echo # ----------------------------------------------------
42 let $tmp_table_stm= CREATE TEMPORARY TABLE tt1(c1 INT) ENGINE = InnoDB
43 SELECT c1 FROM t2;
44 source extra/rpl_tests/rpl_stop_slave.test;
45
46 # Don't need to verify 'CREATE TEMPORARY TABLE' with MyIASM engine, as it
47 # never is binlogged into a transaction since 5.5.
48
49 --echo
50 --echo # Test end
51 SET GLOBAL debug= '-d,after_mysql_insert';
52 source include/restart_slave_sql.inc;
53
54 connection slave;
55 call mtr.add_suppression("Replica SQL.*Request to stop replica SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
56 call mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
57 connection master;
58
59 --source include/rpl_connection_master.inc
60 DROP TABLE t1, t2;
61
62 --source include/rpl_end.inc