Debian Codegraph @

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

raw
1 --source include/have_debug.inc
2 --source include/have_binlog_format_row.inc
3 --source include/master-slave.inc
4
5 # Loss of STMT_END flagged event must error out the IO thread
6 --connection slave
7 call mtr.add_suppression("Slave IO thread did not receive an expected Rows-log end-of-statement");
8 call mtr.add_suppression("Relay log write failure: could not queue event from master");
9
10 SET @save_debug= @@global.debug_dbug;
11 SET GLOBAL debug_dbug="+d,simulate_stmt_end_rows_event_loss";
12 --source include/stop_slave.inc
13 --replace_result $MASTER_MYPORT MASTER_PORT
14 --eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, MASTER_USE_GTID=SLAVE_POS
15
16 --connection master
17 --let $max_row_size=8192
18 --eval CREATE TABLE t (a INT, b text($max_row_size));
19 --eval INSERT INTO t values (1, repeat('b', $max_row_size)), (1, repeat('b', $max_row_size))
20
21 # Prove that the missed STMT_END marked rows-event causes the io thread stop.
22 --connection slave
23 START SLAVE IO_THREAD;
24 --let $slave_io_errno=1595
25 --source include/wait_for_slave_io_error.inc
26 SET GLOBAL debug_dbug="-d,simulate_stmt_end_rows_event_loss";
27 --source include/start_slave.inc
28
29 --connection master
30 sync_slave_with_master;
31
32 # Compressed version of the above
33 --connection slave
34 --source include/stop_slave.inc
35
36 --connection master
37 SET @save_log_bin_compress= @@GLOBAL.log_bin_compress;
38 SET @save_log_bin_compress_min_len= @@GLOBAL.log_bin_compress_min_len;
39
40 SET @@GLOBAL.log_bin_compress=ON;
41 SET @@GLOBAL.log_bin_compress_min_len=10;
42
43 --eval INSERT INTO t values (2, repeat('b', $max_row_size)), (2, repeat('b', $max_row_size))
44
45 # Prove that the missed STMT_END marked rows-event causes the io thread stop.
46 --connection slave
47 SET GLOBAL debug_dbug="+d,simulate_stmt_end_rows_event_loss";
48 START SLAVE IO_THREAD;
49 --let $slave_io_errno=1595
50 --source include/wait_for_slave_io_error.inc
51 SET GLOBAL debug_dbug="-d,simulate_stmt_end_rows_event_loss";
52 --source include/start_slave.inc
53
54 --connection master
55 sync_slave_with_master;
56
57 # cleanup
58
59 --connection master
60 SET @@GLOBAL.log_bin_compress= @save_log_bin_compress;
61 SET @@GLOBAL.log_bin_compress_min_len= @save_log_bin_compress_min_len;
62 DROP TABLE t;
63 sync_slave_with_master;
64 SET GLOBAL debug_dbug= @save_debug;
65
66 --source include/rpl_end.inc