Debian Codegraph @

mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result

raw
1 *** Test STOP SLAVE in parallel mode ***
2 include/master-slave.inc
3 [connection master]
4 connection server_2;
5 SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
6 SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
7 include/stop_slave.inc
8 SET GLOBAL slave_parallel_threads=10;
9 SET GLOBAL slave_parallel_mode='conservative';
10 CHANGE MASTER TO master_use_gtid=slave_pos;
11 include/start_slave.inc
12 connect con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
13 connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
14 connection server_1;
15 ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
16 CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
17 CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
18 CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
19 INSERT INTO t2 VALUES(100);
20 INSERT INTO t3 VALUES(100, 100);
21 connection server_2;
22 include/stop_slave.inc
23 connection server_1;
24 SET binlog_direct_non_transactional_updates=0;
25 SET sql_log_bin=0;
26 CALL mtr.add_suppression("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction");
27 SET sql_log_bin=1;
28 BEGIN;
29 INSERT INTO t2 VALUES (20);
30 INSERT INTO t1 VALUES (20);
31 INSERT INTO t2 VALUES (21);
32 INSERT INTO t3 VALUES (20, 20);
33 COMMIT;
34 INSERT INTO t3 VALUES(21, 21);
35 INSERT INTO t3 VALUES(22, 22);
36 connection con_temp1;
37 BEGIN;
38 INSERT INTO t2 VALUES (21);
39 connection server_2;
40 START SLAVE IO_THREAD;
41 include/wait_for_slave_param.inc [Read_Master_Log_Pos]
42 START SLAVE SQL_THREAD;
43 connection con_temp2;
44 SET @old_dbug= @@GLOBAL.debug_dbug;
45 SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
46 STOP SLAVE;
47 connection con_temp1;
48 SET debug_sync='now WAIT_FOR wait_for_done_waiting';
49 ROLLBACK;
50 connection con_temp2;
51 SET GLOBAL debug_dbug=@old_dbug;
52 SET debug_sync='RESET';
53 connection server_2;
54 include/wait_for_slave_to_stop.inc
55 SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
56 a
57 20
58 SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
59 a
60 20
61 21
62 100
63 SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
64 a b
65 20 20
66 100 100
67 include/start_slave.inc
68 SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
69 a
70 20
71 SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
72 a
73 20
74 21
75 100
76 SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
77 a b
78 20 20
79 21 21
80 22 22
81 100 100
82 connection server_2;
83 include/stop_slave.inc
84 SET GLOBAL slave_parallel_mode=@old_parallel_mode;
85 SET GLOBAL slave_parallel_threads=@old_parallel_threads;
86 include/start_slave.inc
87 SET DEBUG_SYNC= 'RESET';
88 disconnect con_temp1;
89 disconnect con_temp2;
90 connection server_1;
91 DROP TABLE t1,t2,t3;
92 SET DEBUG_SYNC= 'RESET';
93 include/rpl_end.inc