Debian Codegraph @

mysql-test/suite/rpl/r/rpl_parallel_incorrect_relay_pos.result

raw
1 *** MDEV-7237: Parallel replication: incorrect relaylog position after stop/start the slave ***
2 include/master-slave.inc
3 [connection master]
4 connection server_2;
5 include/stop_slave.inc
6 CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
7 SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
8 SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
9 SET GLOBAL slave_parallel_threads=10;
10 SET GLOBAL slave_parallel_mode='conservative';
11 CHANGE MASTER TO master_use_gtid=slave_pos;
12 include/start_slave.inc
13 connection server_1;
14 ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
15 CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
16 INSERT INTO t2 VALUES (40);
17 connection server_2;
18 connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
19 include/stop_slave.inc
20 CHANGE MASTER TO master_use_gtid=no;
21 SET @old_dbug= @@GLOBAL.debug_dbug;
22 SET GLOBAL debug_dbug="+d,rpl_parallel_scheduled_gtid_0_x_100";
23 SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
24 SET GLOBAL slave_parallel_threads=0;
25 SET GLOBAL slave_parallel_threads=10;
26 connection server_1;
27 INSERT INTO t2 VALUES (41);
28 INSERT INTO t2 VALUES (42);
29 SET @old_format= @@binlog_format;
30 SET binlog_format= statement;
31 DELETE FROM t2 WHERE a=40;
32 SET binlog_format= @old_format;
33 INSERT INTO t2 VALUES (43);
34 INSERT INTO t2 VALUES (44);
35 FLUSH LOGS;
36 INSERT INTO t2 VALUES (45);
37 SET gtid_seq_no=100;
38 INSERT INTO t2 VALUES (46);
39 connection con_temp2;
40 BEGIN;
41 SELECT * FROM t2 WHERE a=40 FOR UPDATE;
42 a
43 40
44 connection server_2;
45 include/start_slave.inc
46 SET debug_sync= 'now WAIT_FOR scheduled_gtid_0_x_100';
47 STOP SLAVE;
48 connection con_temp2;
49 SET debug_sync= 'now WAIT_FOR wait_for_done_waiting';
50 ROLLBACK;
51 connection server_2;
52 include/wait_for_slave_sql_to_stop.inc
53 SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
54 a
55 41
56 42
57 include/start_slave.inc
58 SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
59 a
60 41
61 42
62 43
63 44
64 45
65 46
66 include/stop_slave.inc
67 SET GLOBAL debug_dbug=@old_dbug;
68 SET DEBUG_SYNC= 'RESET';
69 SET GLOBAL slave_parallel_threads=@old_parallel_threads;
70 SET GLOBAL slave_parallel_mode=@old_parallel_mode;
71 CHANGE MASTER TO master_use_gtid=slave_pos;
72 include/start_slave.inc
73 connection server_1;
74 DROP TABLE t2;
75 include/rpl_end.inc