Debian Codegraph @

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

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