Debian Codegraph @

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

raw
1 --echo *** MDEV_6435: Incorrect error handling when query binlogged partially on master with "killed" error ***
2
3 --source include/have_innodb.inc
4 --source include/have_debug.inc
5 --source include/have_debug_sync.inc
6 --source include/have_binlog_format_statement.inc
7 --source include/master-slave.inc
8
9 --connection server_2
10 --source include/stop_slave.inc
11 SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
12 SET GLOBAL slave_parallel_threads=1;
13 CHANGE MASTER TO master_use_gtid=slave_pos;
14 --source include/start_slave.inc
15
16 --connection server_1
17 ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
18 CREATE TABLE t6 (a INT) ENGINE=MyISAM;
19 CREATE TRIGGER tr AFTER INSERT ON t6 FOR EACH ROW SET @a = 1;
20 --connect (con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
21
22 --connection con1
23 --let $conid = `SELECT CONNECTION_ID()`
24 SET debug_sync='sp_head_execute_before_loop SIGNAL ready WAIT_FOR cont';
25 send INSERT INTO t6 VALUES (1), (2), (3);
26
27 --connection server_1
28 SET debug_sync='now WAIT_FOR ready';
29 --replace_result $conid CONID
30 eval KILL QUERY $conid;
31 SET debug_sync='now SIGNAL cont';
32
33 --connection con1
34 --error ER_QUERY_INTERRUPTED
35 --reap
36 SET debug_sync='RESET';
37 --let $after_error_gtid_pos= `SELECT @@gtid_binlog_pos`
38
39 --connection server_1
40 SET debug_sync='RESET';
41
42 --connection server_2
43 --let $slave_sql_errno= 1317
44 --source include/wait_for_slave_sql_error.inc
45 STOP SLAVE IO_THREAD;
46 --replace_result $after_error_gtid_pos AFTER_ERROR_GTID_POS
47 eval SET GLOBAL gtid_slave_pos= '$after_error_gtid_pos';
48 --source include/start_slave.inc
49
50 --connection server_1
51 INSERT INTO t6 VALUES (4);
52 SELECT * FROM t6 ORDER BY a;
53 --save_master_pos
54
55 --connection server_2
56 --sync_with_master
57 SELECT * FROM t6 ORDER BY a;
58
59 # Clean up.
60 --connection server_2
61 --source include/stop_slave.inc
62 SET GLOBAL slave_parallel_threads=@old_parallel_threads;
63 --source include/start_slave.inc
64 SET DEBUG_SYNC= 'RESET';
65
66 --connection server_1
67 DROP TABLE t6;
68 SET DEBUG_SYNC= 'RESET';
69 --disconnect con1
70
71 --source include/rpl_end.inc