Debian Codegraph @

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

raw
1 # Specialized --log-slave-updates = 0 version of parallel_backup test.
2 # MDEV-21953: deadlock between BACKUP STAGE BLOCK_COMMIT and parallel
3 # MDEV-30423: dealock XA COMMIT vs BACKUP
4 include/master-slave.inc
5 [connection master]
6 #
7 # MDEV-21953: deadlock between BACKUP STAGE BLOCK_COMMIT and parallel
8 # replication
9 #
10 connection master;
11 CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = innodb;
12 INSERT INTO t1 VALUES(100);
13 connection slave;
14 call mtr.add_suppression("Deadlock found when trying to get lock");
15 call mtr.add_suppression("Commit failed due to failure of an earlier commit");
16 include/stop_slave.inc
17 SET @old_parallel_threads= @@GLOBAL.slave_parallel_threads;
18 SET @old_parallel_mode = @@GLOBAL.slave_parallel_mode;
19 SET @@global.slave_parallel_threads= 2;
20 SET @@global.slave_parallel_mode = 'optimistic';
21 connection master;
22 INSERT INTO t1 VALUES (1);
23 INSERT INTO t1 VALUES (2);
24 connect aux_slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
25 BEGIN;
26 INSERT INTO t1 VALUES (1);
27 connection slave;
28 include/start_slave.inc
29 connection aux_slave;
30 connect backup_slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
31 BACKUP STAGE START;
32 BACKUP STAGE BLOCK_COMMIT;
33 connection aux_slave;
34 ROLLBACK;
35 connection backup_slave;
36 BACKUP STAGE END;
37 connection slave;
38 include/diff_tables.inc [master:t1,slave:t1]
39 # MDEV-30423: dealock XA COMMIT vs BACKUP
40 #
41 # Normal XA COMMIT
42 connection slave;
43 include/stop_slave.inc
44 connection master;
45 connection aux_slave;
46 BEGIN;
47 INSERT INTO t1 VALUES (102);
48 connection master;
49 XA START '1';
50 INSERT INTO t1 VALUES (101);
51 XA END '1';
52 XA PREPARE '1';
53 connection master1;
54 INSERT INTO t1 VALUES (102);
55 connection master;
56 XA COMMIT '1';
57 include/save_master_gtid.inc
58 connection slave;
59 include/start_slave.inc
60 connection aux_slave;
61 # Xid '1' must be in the output:
62 XA RECOVER;
63 formatID gtrid_length bqual_length data
64 1 1 0 1
65 connection backup_slave;
66 BACKUP STAGE START;
67 BACKUP STAGE BLOCK_COMMIT;
68 connection aux_slave;
69 ROLLBACK;
70 connection backup_slave;
71 BACKUP STAGE END;
72 connection slave;
73 include/sync_with_master_gtid.inc
74 include/stop_slave.inc
75 #
76 # Normal XA ROLLBACK
77 connection slave;
78 include/stop_slave.inc
79 connection master;
80 connection aux_slave;
81 BEGIN;
82 INSERT INTO t1 VALUES (104);
83 connection master;
84 XA START '1';
85 INSERT INTO t1 VALUES (103);
86 XA END '1';
87 XA PREPARE '1';
88 connection master1;
89 INSERT INTO t1 VALUES (104);
90 connection master;
91 XA ROLLBACK '1';
92 include/save_master_gtid.inc
93 connection slave;
94 include/start_slave.inc
95 connection aux_slave;
96 # Xid '1' must be in the output:
97 XA RECOVER;
98 formatID gtrid_length bqual_length data
99 1 1 0 1
100 connection backup_slave;
101 BACKUP STAGE START;
102 BACKUP STAGE BLOCK_COMMIT;
103 connection aux_slave;
104 ROLLBACK;
105 connection backup_slave;
106 BACKUP STAGE END;
107 connection slave;
108 include/sync_with_master_gtid.inc
109 include/stop_slave.inc
110 #
111 # Errored out XA COMMIT
112 connection slave;
113 include/stop_slave.inc
114 connection master;
115 connection aux_slave;
116 BEGIN;
117 INSERT INTO t1 VALUES (106);
118 connection master;
119 XA START '1';
120 INSERT INTO t1 VALUES (105);
121 XA END '1';
122 XA PREPARE '1';
123 connection master1;
124 INSERT INTO t1 VALUES (106);
125 connection master;
126 XA COMMIT '1';
127 include/save_master_gtid.inc
128 connection slave;
129 SET @sav_innodb_lock_wait_timeout = @@global.innodb_lock_wait_timeout;
130 SET @sav_slave_transaction_retries = @@global.slave_transaction_retries;
131 SET @@global.innodb_lock_wait_timeout =5;
132 SET @@global.slave_transaction_retries=0;
133 include/start_slave.inc
134 connection aux_slave;
135 # Xid '1' must be in the output:
136 XA RECOVER;
137 formatID gtrid_length bqual_length data
138 1 1 0 1
139 connection backup_slave;
140 BACKUP STAGE START;
141 BACKUP STAGE BLOCK_COMMIT;
142 connection aux_slave;
143 ROLLBACK;
144 connection backup_slave;
145 BACKUP STAGE END;
146 connection slave;
147 include/stop_slave.inc
148 SET @@global.innodb_lock_wait_timeout = @sav_innodb_lock_wait_timeout;
149 SET @@global.slave_transaction_retries= @sav_slave_transaction_retries;
150 connection slave;
151 include/start_slave.inc
152 include/sync_with_master_gtid.inc
153 #
154 # Errored out XA ROLLBACK
155 connection slave;
156 include/stop_slave.inc
157 connection master;
158 connection aux_slave;
159 BEGIN;
160 INSERT INTO t1 VALUES (108);
161 connection master;
162 XA START '1';
163 INSERT INTO t1 VALUES (107);
164 XA END '1';
165 XA PREPARE '1';
166 connection master1;
167 INSERT INTO t1 VALUES (108);
168 connection master;
169 XA ROLLBACK '1';
170 include/save_master_gtid.inc
171 connection slave;
172 SET @sav_innodb_lock_wait_timeout = @@global.innodb_lock_wait_timeout;
173 SET @sav_slave_transaction_retries = @@global.slave_transaction_retries;
174 SET @@global.innodb_lock_wait_timeout =5;
175 SET @@global.slave_transaction_retries=0;
176 include/start_slave.inc
177 connection aux_slave;
178 # Xid '1' must be in the output:
179 XA RECOVER;
180 formatID gtrid_length bqual_length data
181 1 1 0 1
182 connection backup_slave;
183 BACKUP STAGE START;
184 BACKUP STAGE BLOCK_COMMIT;
185 connection aux_slave;
186 ROLLBACK;
187 connection backup_slave;
188 BACKUP STAGE END;
189 connection slave;
190 include/stop_slave.inc
191 SET @@global.innodb_lock_wait_timeout = @sav_innodb_lock_wait_timeout;
192 SET @@global.slave_transaction_retries= @sav_slave_transaction_retries;
193 connection slave;
194 include/start_slave.inc
195 include/sync_with_master_gtid.inc
196 connection slave;
197 include/stop_slave.inc
198 SET @@global.slave_parallel_threads= @old_parallel_threads;
199 SET @@global.slave_parallel_mode = @old_parallel_mode;
200 include/start_slave.inc
201 connection server_1;
202 DROP TABLE t1;
203 include/rpl_end.inc