Debian Codegraph @

mysql-test/suite/rpl_gtid/t/rpl_drop_temp_gtid.test

raw
1 # ==== Purpose ====
2 #
3 # Verify if the temporary tables will still be present on the slave after
4 # restarting only the IO thread when using the GTID AUTO_POSITION protocol.
5 #
6 # ==== Related Bugs and Worklogs ====
7 #
8 # Bug#18472603 SQL THREAD COMMITS PARTIAL TRANSACTION WITH GTID AND AUTO
9 # POSITIONING ENABLED
10 #
11 --source include/have_binlog_format_statement.inc
12 --let $use_gtids= 1
13 --source include/master-slave.inc
14
15 --echo # Initial setup
16 --source include/rpl_connection_master.inc
17 CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
18 CREATE TEMPORARY TABLE temp_t1 (c1 INT) ENGINE=InnoDB;
19
20 --echo # Insert the data in the master
21 BEGIN;
22 INSERT INTO temp_t1 VALUES (1);
23 COMMIT;
24
25 BEGIN;
26 INSERT INTO t1 VALUES ((SELECT COUNT(*) FROM temp_t1));
27 COMMIT;
28 --source include/sync_slave_sql_with_master.inc
29
30 --source include/rpl_connection_slave.inc
31 --echo # Stop the IO thread
32 --source include/stop_slave_io.inc
33 --echo # Restart IO thread
34 --source include/start_slave_io.inc
35
36 --echo # Do one more insert on master and then sync slave with master
37 --source include/rpl_connection_master.inc
38 BEGIN;
39 INSERT INTO t1 VALUES ((SELECT COUNT(*) FROM temp_t1));
40 COMMIT;
41 --source include/sync_slave_sql_with_master.inc
42
43 --echo # Now compare master and slave's t1 table data
44 --source include/rpl_connection_master.inc
45 --let diff_tables= master:t1, slave:t1
46 --source include/diff_tables.inc
47
48 --echo # Cleanup
49 --source include/rpl_connection_master.inc
50 DROP TABLE t1, temp_t1;
51 --source include/rpl_end.inc