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