Debian Codegraph @

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

raw
1 # ==== Purpose ====
2 #
3 # This test case will verify that applier works correctly (writing the slave
4 # rpl info on table and also storing GTIDs on table) when a relay log split
5 # a transaction letting the GTID event in one relay log file and the rest of
6 # the transaction on the next relay log file. The reported issue happened when
7 # log-replica-updates was off and relay-log-info-repository was set to TABLE,
8 # both defined at test case '-slave.opt' file.
9 #
10 # The test case will generate a stream of events with two "transactions" and
11 # will flush the slave relay log once queuing the second GTID event received.
12 #
13 # After syncing the receiver thread, the test case will start the applier
14 # thread to ensure its proper behavior.
15 #
16 # ==== Related Bugs and Worklogs ====
17 #
18 # BUG#20451386 SQL THREAD CRASH: LOG-REPLICA-UPDATES OFF, RELAY LOG ENDS
19 # WITH GTID_LOG_EVENT
20
21 # This test should run only on debug build
22 --source include/have_debug.inc
23 # This test uses debug sync to stop the IO thread in the middle of a transaction
24 --source include/have_debug_sync.inc
25 --source include/have_binlog_format_statement.inc
26 --let $rpl_skip_start_slave= 1
27 --source include/master-slave.inc
28
29 # Create a table and insert some data
30 CREATE TABLE t1 (c1 INT) ENGINE= InnoDB;
31 INSERT INTO t1 VALUES (1);
32
33 ###
34 ### Flush the relay log after the second GTID is received
35 ###
36 --source include/rpl_connection_slave.inc
37 --let $rpl_after_received_events_action= flush
38 --let $rpl_event_count= 2
39 --let $rpl_count_only_event_type= Gtid
40 --source include/rpl_receive_event_count.inc
41
42 # Sync the receiver thread with the master
43 --source include/rpl_connection_master.inc
44 --source include/sync_slave_io_with_master.inc
45
46 # Now start the applier thread
47 --source include/start_slave_sql.inc
48 --source include/rpl_connection_master.inc
49 --source include/sync_slave_sql_with_master.inc
50
51 # Cleanup
52 --source include/rpl_connection_master.inc
53 DROP TABLE t1;
54 --source include/rpl_end.inc