Debian Codegraph @

mysql-test/suite/clone/r/remote_error_ddl_lock.result

raw
1 # In connection CON1
2 INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN';
3 SHOW VARIABLES LIKE 'clone_ddl_timeout';
4 Variable_name Value
5 clone_ddl_timeout 300
6 SHOW VARIABLES LIKE 'clone_block_ddl';
7 Variable_name Value
8 clone_block_ddl OFF
9 # Set backup lock timeout to 1 sec
10 SET GLOBAL clone_block_ddl = true;
11 SET GLOBAL clone_ddl_timeout = 1;
12 SHOW VARIABLES LIKE 'clone_block_ddl';
13 Variable_name Value
14 clone_block_ddl ON
15 SHOW VARIABLES LIKE 'clone_ddl_timeout';
16 Variable_name Value
17 clone_ddl_timeout 1
18 SHOW VARIABLES LIKE "lock_wait_timeout";
19 Variable_name Value
20 lock_wait_timeout 1
21 # In connection DEFAULT
22 # 1A. Clone while CREATE TABLE in progress
23 # In connection CON1
24 SET DEBUG_SYNC = 'clone_notify_ddl SIGNAL resume_clone WAIT_FOR resume_ddl';
25 CREATE TABLE t1 (col1 INT PRIMARY KEY);
26 # In connection DEFAULT
27 SET DEBUG_SYNC = 'now WAIT_FOR resume_clone';
28 SET GLOBAL clone_autotune_concurrency = OFF;
29 SET GLOBAL clone_max_concurrency = 8;
30 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
31 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
32 ERROR HY000: Clone Donor Error: 1205 : Lock wait timeout exceeded; try restarting transaction.
33 select ID, STATE, ERROR_NO from performance_schema.clone_status;
34 ID STATE ERROR_NO
35 1 Failed 3862
36 select ID, STAGE, STATE from performance_schema.clone_progress;
37 ID STAGE STATE
38 SET DEBUG_SYNC = 'now SIGNAL resume_ddl';
39 # In connection CON1
40 # In connection DEFAULT
41 SHOW CREATE TABLE t1;
42 Table Create Table
43 t1 CREATE TABLE `t1` (
44 `col1` int NOT NULL,
45 PRIMARY KEY (`col1`)
46 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
47 # 1B. CREATE TABLE while clone in progress
48 SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_ddl WAIT_FOR resume_clone';
49 SET GLOBAL clone_autotune_concurrency = OFF;
50 SET GLOBAL clone_max_concurrency = 8;
51 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
52 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
53 # In connection CON1
54 SET DEBUG_SYNC = 'now WAIT_FOR start_ddl';
55 CREATE TABLE t2 (col1 INT PRIMARY KEY);
56 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
57 SET DEBUG_SYNC = 'now SIGNAL resume_clone';
58 # In connection DEFAULT
59 SET DEBUG_SYNC = 'RESET';
60 # 1C. ALTER INSTANCE while clone in progress
61 SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_ddl WAIT_FOR resume_clone';
62 SET GLOBAL clone_autotune_concurrency = OFF;
63 SET GLOBAL clone_max_concurrency = 8;
64 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
65 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
66 # In connection CON1
67 SET DEBUG_SYNC = 'now WAIT_FOR start_ddl';
68 ALTER INSTANCE DISABLE INNODB REDO_LOG;
69 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
70 SET DEBUG_SYNC = 'now SIGNAL resume_clone';
71 # In connection DEFAULT
72 SET DEBUG_SYNC = 'RESET';
73 SHOW STATUS LIKE 'innodb_redo_log_enabled';
74 Variable_name Value
75 Innodb_redo_log_enabled ON
76 # 1C. Clone while ALTER INSTANCE in progress
77 # In connection CON1
78 SET DEBUG_SYNC = 'clone_notify_ddl SIGNAL resume_clone WAIT_FOR resume_ddl';
79 ALTER INSTANCE DISABLE INNODB REDO_LOG;
80 # In connection DEFAULT
81 SET DEBUG_SYNC = 'now WAIT_FOR resume_clone';
82 SET GLOBAL clone_autotune_concurrency = OFF;
83 SET GLOBAL clone_max_concurrency = 8;
84 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
85 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
86 ERROR HY000: Clone Donor Error: 1205 : Lock wait timeout exceeded; try restarting transaction.
87 select ID, STATE, ERROR_NO from performance_schema.clone_status;
88 ID STATE ERROR_NO
89 1 Failed 3862
90 select ID, STAGE, STATE from performance_schema.clone_progress;
91 ID STAGE STATE
92 SET DEBUG_SYNC = 'now SIGNAL resume_ddl';
93 # In connection CON1
94 # In connection DEFAULT
95 SHOW STATUS LIKE 'innodb_redo_log_enabled';
96 Variable_name Value
97 Innodb_redo_log_enabled OFF
98 ALTER INSTANCE ENABLE INNODB REDO_LOG;
99 # 2A. Clone while ALTER TABLE ADD COLUMN [COPY] in progress
100 INSERT INTO t1 values(10), (20), (30);
101 SELECT * FROM t1 ORDER BY col1;
102 col1
103 10
104 20
105 30
106 # In connection CON1
107 SET DEBUG_SYNC = 'clone_notify_ddl SIGNAL resume_clone WAIT_FOR resume_ddl';
108 ALTER TABLE t1 ADD COLUMN col2 int, ALGORITHM=COPY;
109 # In connection DEFAULT
110 SET DEBUG_SYNC = 'now WAIT_FOR resume_clone';
111 SET GLOBAL clone_autotune_concurrency = OFF;
112 SET GLOBAL clone_max_concurrency = 8;
113 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
114 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
115 ERROR HY000: Clone Donor Error: 1205 : Lock wait timeout exceeded; try restarting transaction.
116 select ID, STATE, ERROR_NO from performance_schema.clone_status;
117 ID STATE ERROR_NO
118 1 Failed 3862
119 select ID, STAGE, STATE from performance_schema.clone_progress;
120 ID STAGE STATE
121 SET DEBUG_SYNC = 'now SIGNAL resume_ddl';
122 # In connection CON1
123 # In connection DEFAULT
124 SHOW CREATE TABLE t1;
125 Table Create Table
126 t1 CREATE TABLE `t1` (
127 `col1` int NOT NULL,
128 `col2` int DEFAULT NULL,
129 PRIMARY KEY (`col1`)
130 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
131 SELECT * FROM t1 ORDER BY col1;
132 col1 col2
133 10 NULL
134 20 NULL
135 30 NULL
136 UPDATE t1 SET col2 = col1 + 1000;
137 # 2B. ALTER TABLE ADD COLUMN [COPY] while clone in progress
138 SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_ddl WAIT_FOR resume_clone';
139 SET GLOBAL clone_autotune_concurrency = OFF;
140 SET GLOBAL clone_max_concurrency = 8;
141 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
142 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
143 # In connection CON1
144 SET DEBUG_SYNC = 'now WAIT_FOR start_ddl';
145 ALTER TABLE t1 ADD COLUMN col3 int, ALGORITHM=COPY;
146 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
147 SET DEBUG_SYNC = 'now SIGNAL resume_clone';
148 # In connection DEFAULT
149 SET DEBUG_SYNC = 'RESET';
150 # 2C. Clone while ALTER TABLE ADD COLUMN [INPLACE] in progress
151 SELECT * FROM t1 ORDER BY col1;
152 col1 col2
153 10 1010
154 20 1020
155 30 1030
156 # In connection CON1
157 SET DEBUG_SYNC = 'clone_notify_ddl SIGNAL resume_clone WAIT_FOR resume_ddl';
158 ALTER TABLE t1 ADD COLUMN col3 int, ALGORITHM=INPLACE;
159 # In connection DEFAULT
160 SET DEBUG_SYNC = 'now WAIT_FOR resume_clone';
161 SET GLOBAL clone_autotune_concurrency = OFF;
162 SET GLOBAL clone_max_concurrency = 8;
163 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
164 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
165 ERROR HY000: Clone Donor Error: 1205 : Lock wait timeout exceeded; try restarting transaction.
166 select ID, STATE, ERROR_NO from performance_schema.clone_status;
167 ID STATE ERROR_NO
168 1 Failed 3862
169 select ID, STAGE, STATE from performance_schema.clone_progress;
170 ID STAGE STATE
171 SET DEBUG_SYNC = 'now SIGNAL resume_ddl';
172 # In connection CON1
173 # In connection DEFAULT
174 SHOW CREATE TABLE t1;
175 Table Create Table
176 t1 CREATE TABLE `t1` (
177 `col1` int NOT NULL,
178 `col2` int DEFAULT NULL,
179 `col3` int DEFAULT NULL,
180 PRIMARY KEY (`col1`)
181 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
182 SELECT * FROM t1 ORDER BY col1;
183 col1 col2 col3
184 10 1010 NULL
185 20 1020 NULL
186 30 1030 NULL
187 UPDATE t1 SET col3 = col2 + 1000;
188 # 2D. ALTER TABLE ADD COLUMN [INPLACE] while clone in progress
189 SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_ddl WAIT_FOR resume_clone';
190 SET GLOBAL clone_autotune_concurrency = OFF;
191 SET GLOBAL clone_max_concurrency = 8;
192 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
193 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
194 # In connection CON1
195 SET DEBUG_SYNC = 'now WAIT_FOR start_ddl';
196 ALTER TABLE t1 ADD COLUMN col4 int, ALGORITHM=INPLACE;
197 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
198 SET DEBUG_SYNC = 'now SIGNAL resume_clone';
199 # In connection DEFAULT
200 SET DEBUG_SYNC = 'RESET';
201 # 3A. Clone while ADD INDEX [COPY] in progress
202 SHOW CREATE TABLE t1;
203 Table Create Table
204 t1 CREATE TABLE `t1` (
205 `col1` int NOT NULL,
206 `col2` int DEFAULT NULL,
207 `col3` int DEFAULT NULL,
208 PRIMARY KEY (`col1`)
209 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
210 # In connection CON1
211 SET DEBUG_SYNC = 'clone_notify_ddl SIGNAL resume_clone WAIT_FOR resume_ddl';
212 ALTER TABLE t1 ADD INDEX col2_idx(col2), ALGORITHM=COPY;
213 # In connection DEFAULT
214 SET DEBUG_SYNC = 'now WAIT_FOR resume_clone';
215 SET GLOBAL clone_autotune_concurrency = OFF;
216 SET GLOBAL clone_max_concurrency = 8;
217 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
218 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
219 ERROR HY000: Clone Donor Error: 1205 : Lock wait timeout exceeded; try restarting transaction.
220 select ID, STATE, ERROR_NO from performance_schema.clone_status;
221 ID STATE ERROR_NO
222 1 Failed 3862
223 select ID, STAGE, STATE from performance_schema.clone_progress;
224 ID STAGE STATE
225 SET DEBUG_SYNC = 'now SIGNAL resume_ddl';
226 # In connection CON1
227 # In connection DEFAULT
228 SHOW CREATE TABLE t1;
229 Table Create Table
230 t1 CREATE TABLE `t1` (
231 `col1` int NOT NULL,
232 `col2` int DEFAULT NULL,
233 `col3` int DEFAULT NULL,
234 PRIMARY KEY (`col1`),
235 KEY `col2_idx` (`col2`)
236 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
237 # 3B. ADD INDEX [COPY] while clone in progress
238 SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_ddl WAIT_FOR resume_clone';
239 SET GLOBAL clone_autotune_concurrency = OFF;
240 SET GLOBAL clone_max_concurrency = 8;
241 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
242 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
243 # In connection CON1
244 SET DEBUG_SYNC = 'now WAIT_FOR start_ddl';
245 ALTER TABLE t1 ADD INDEX col3_idx(col3), ALGORITHM=COPY;
246 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
247 SET DEBUG_SYNC = 'now SIGNAL resume_clone';
248 # In connection DEFAULT
249 SET DEBUG_SYNC = 'RESET';
250 # 3C. Clone while ADD INDEX [INPLACE] in progress
251 SHOW CREATE TABLE t1;
252 Table Create Table
253 t1 CREATE TABLE `t1` (
254 `col1` int NOT NULL,
255 `col2` int DEFAULT NULL,
256 `col3` int DEFAULT NULL,
257 PRIMARY KEY (`col1`),
258 KEY `col2_idx` (`col2`)
259 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
260 # In connection CON1
261 SET DEBUG_SYNC = 'clone_notify_ddl SIGNAL resume_clone WAIT_FOR resume_ddl';
262 ALTER TABLE t1 ADD INDEX col3_idx(col3), ALGORITHM=INPLACE;
263 # In connection DEFAULT
264 SET DEBUG_SYNC = 'now WAIT_FOR resume_clone';
265 SET GLOBAL clone_autotune_concurrency = OFF;
266 SET GLOBAL clone_max_concurrency = 8;
267 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
268 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
269 ERROR HY000: Clone Donor Error: 1205 : Lock wait timeout exceeded; try restarting transaction.
270 select ID, STATE, ERROR_NO from performance_schema.clone_status;
271 ID STATE ERROR_NO
272 1 Failed 3862
273 select ID, STAGE, STATE from performance_schema.clone_progress;
274 ID STAGE STATE
275 SET DEBUG_SYNC = 'now SIGNAL resume_ddl';
276 # In connection CON1
277 # In connection DEFAULT
278 SHOW CREATE TABLE t1;
279 Table Create Table
280 t1 CREATE TABLE `t1` (
281 `col1` int NOT NULL,
282 `col2` int DEFAULT NULL,
283 `col3` int DEFAULT NULL,
284 PRIMARY KEY (`col1`),
285 KEY `col2_idx` (`col2`),
286 KEY `col3_idx` (`col3`)
287 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
288 # 3D. ADD INDEX [INPLACE] while clone in progress
289 SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_ddl WAIT_FOR resume_clone';
290 SET GLOBAL clone_autotune_concurrency = OFF;
291 SET GLOBAL clone_max_concurrency = 8;
292 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
293 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
294 # In connection CON1
295 SET DEBUG_SYNC = 'now WAIT_FOR start_ddl';
296 ALTER TABLE t1 ADD INDEX col1_idx(col1), ALGORITHM=COPY;
297 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
298 SET DEBUG_SYNC = 'now SIGNAL resume_clone';
299 # In connection DEFAULT
300 SET DEBUG_SYNC = 'RESET';
301 # 4A. DROP INDEX [COPY] while clone in progress
302 SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_ddl WAIT_FOR resume_clone';
303 SET GLOBAL clone_autotune_concurrency = OFF;
304 SET GLOBAL clone_max_concurrency = 8;
305 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
306 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
307 # In connection CON1
308 SET DEBUG_SYNC = 'now WAIT_FOR start_ddl';
309 ALTER TABLE t1 DROP INDEX col3_idx, ALGORITHM=COPY;
310 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
311 SET DEBUG_SYNC = 'now SIGNAL resume_clone';
312 # In connection DEFAULT
313 SET DEBUG_SYNC = 'RESET';
314 # 4B. Clone while DROP INDEX [COPY] in progress
315 SHOW CREATE TABLE t1;
316 Table Create Table
317 t1 CREATE TABLE `t1` (
318 `col1` int NOT NULL,
319 `col2` int DEFAULT NULL,
320 `col3` int DEFAULT NULL,
321 PRIMARY KEY (`col1`),
322 KEY `col2_idx` (`col2`),
323 KEY `col3_idx` (`col3`)
324 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
325 # In connection CON1
326 SET DEBUG_SYNC = 'clone_notify_ddl SIGNAL resume_clone WAIT_FOR resume_ddl';
327 ALTER TABLE t1 DROP INDEX col3_idx, ALGORITHM=COPY;
328 # In connection DEFAULT
329 SET DEBUG_SYNC = 'now WAIT_FOR resume_clone';
330 SET GLOBAL clone_autotune_concurrency = OFF;
331 SET GLOBAL clone_max_concurrency = 8;
332 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
333 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
334 ERROR HY000: Clone Donor Error: 1205 : Lock wait timeout exceeded; try restarting transaction.
335 select ID, STATE, ERROR_NO from performance_schema.clone_status;
336 ID STATE ERROR_NO
337 1 Failed 3862
338 select ID, STAGE, STATE from performance_schema.clone_progress;
339 ID STAGE STATE
340 SET DEBUG_SYNC = 'now SIGNAL resume_ddl';
341 # In connection CON1
342 # In connection DEFAULT
343 SHOW CREATE TABLE t1;
344 Table Create Table
345 t1 CREATE TABLE `t1` (
346 `col1` int NOT NULL,
347 `col2` int DEFAULT NULL,
348 `col3` int DEFAULT NULL,
349 PRIMARY KEY (`col1`),
350 KEY `col2_idx` (`col2`)
351 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
352 # 4C. DROP INDEX [INPLACE] while clone in progress
353 SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_ddl WAIT_FOR resume_clone';
354 SET GLOBAL clone_autotune_concurrency = OFF;
355 SET GLOBAL clone_max_concurrency = 8;
356 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
357 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
358 # In connection CON1
359 SET DEBUG_SYNC = 'now WAIT_FOR start_ddl';
360 ALTER TABLE t1 DROP INDEX col2_idx, ALGORITHM=INPLACE;
361 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
362 SET DEBUG_SYNC = 'now SIGNAL resume_clone';
363 # In connection DEFAULT
364 SET DEBUG_SYNC = 'RESET';
365 # 4D. Clone while DROP INDEX [INPLACE] in progress
366 SHOW CREATE TABLE t1;
367 Table Create Table
368 t1 CREATE TABLE `t1` (
369 `col1` int NOT NULL,
370 `col2` int DEFAULT NULL,
371 `col3` int DEFAULT NULL,
372 PRIMARY KEY (`col1`),
373 KEY `col2_idx` (`col2`)
374 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
375 # In connection CON1
376 SET DEBUG_SYNC = 'clone_notify_ddl SIGNAL resume_clone WAIT_FOR resume_ddl';
377 ALTER TABLE t1 DROP INDEX col2_idx, ALGORITHM=INPLACE;
378 # In connection DEFAULT
379 SET DEBUG_SYNC = 'now WAIT_FOR resume_clone';
380 SET GLOBAL clone_autotune_concurrency = OFF;
381 SET GLOBAL clone_max_concurrency = 8;
382 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
383 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
384 ERROR HY000: Clone Donor Error: 1205 : Lock wait timeout exceeded; try restarting transaction.
385 select ID, STATE, ERROR_NO from performance_schema.clone_status;
386 ID STATE ERROR_NO
387 1 Failed 3862
388 select ID, STAGE, STATE from performance_schema.clone_progress;
389 ID STAGE STATE
390 SET DEBUG_SYNC = 'now SIGNAL resume_ddl';
391 # In connection CON1
392 # In connection DEFAULT
393 SHOW CREATE TABLE t1;
394 Table Create Table
395 t1 CREATE TABLE `t1` (
396 `col1` int NOT NULL,
397 `col2` int DEFAULT NULL,
398 `col3` int DEFAULT NULL,
399 PRIMARY KEY (`col1`)
400 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
401 # 5A. TRUNCATE TABLE while clone in progress
402 SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_ddl WAIT_FOR resume_clone';
403 SET GLOBAL clone_autotune_concurrency = OFF;
404 SET GLOBAL clone_max_concurrency = 8;
405 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
406 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
407 # In connection CON1
408 SET DEBUG_SYNC = 'now WAIT_FOR start_ddl';
409 TRUNCATE TABLE t1;
410 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
411 SET DEBUG_SYNC = 'now SIGNAL resume_clone';
412 # In connection DEFAULT
413 SET DEBUG_SYNC = 'RESET';
414 # 5B. Clone while TRUNCATE TABLE in progress
415 SELECT * FROM t1 ORDER BY col1;
416 col1 col2 col3
417 10 1010 2010
418 20 1020 2020
419 30 1030 2030
420 # In connection CON1
421 SET DEBUG_SYNC = 'clone_notify_ddl SIGNAL resume_clone WAIT_FOR resume_ddl';
422 TRUNCATE TABLE t1;
423 # In connection DEFAULT
424 SET DEBUG_SYNC = 'now WAIT_FOR resume_clone';
425 SET GLOBAL clone_autotune_concurrency = OFF;
426 SET GLOBAL clone_max_concurrency = 8;
427 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
428 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
429 ERROR HY000: Clone Donor Error: 1205 : Lock wait timeout exceeded; try restarting transaction.
430 select ID, STATE, ERROR_NO from performance_schema.clone_status;
431 ID STATE ERROR_NO
432 1 Failed 3862
433 select ID, STAGE, STATE from performance_schema.clone_progress;
434 ID STAGE STATE
435 SET DEBUG_SYNC = 'now SIGNAL resume_ddl';
436 # In connection CON1
437 # In connection DEFAULT
438 SELECT * FROM t1 ORDER BY col1;
439 col1 col2 col3
440 # 6A. DROP TABLE while clone in progress
441 SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_ddl WAIT_FOR resume_clone';
442 SET GLOBAL clone_autotune_concurrency = OFF;
443 SET GLOBAL clone_max_concurrency = 8;
444 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
445 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
446 # In connection CON1
447 SET DEBUG_SYNC = 'now WAIT_FOR start_ddl';
448 DROP TABLE t1;
449 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
450 SET DEBUG_SYNC = 'now SIGNAL resume_clone';
451 # In connection DEFAULT
452 SET DEBUG_SYNC = 'RESET';
453 SHOW CREATE TABLE t1;
454 Table Create Table
455 t1 CREATE TABLE `t1` (
456 `col1` int NOT NULL,
457 `col2` int DEFAULT NULL,
458 `col3` int DEFAULT NULL,
459 PRIMARY KEY (`col1`)
460 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
461 # 6B. Clone while DROP TABLE in progress
462 # In connection CON1
463 SET DEBUG_SYNC = 'clone_notify_ddl SIGNAL resume_clone WAIT_FOR resume_ddl';
464 DROP TABLE t1;
465 # In connection DEFAULT
466 SET DEBUG_SYNC = 'now WAIT_FOR resume_clone';
467 SET GLOBAL clone_autotune_concurrency = OFF;
468 SET GLOBAL clone_max_concurrency = 8;
469 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
470 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
471 ERROR HY000: Clone Donor Error: 1205 : Lock wait timeout exceeded; try restarting transaction.
472 select ID, STATE, ERROR_NO from performance_schema.clone_status;
473 ID STATE ERROR_NO
474 1 Failed 3862
475 select ID, STAGE, STATE from performance_schema.clone_progress;
476 ID STAGE STATE
477 SET DEBUG_SYNC = 'now SIGNAL resume_ddl';
478 # In connection CON1
479 # In connection DEFAULT
480 #Cleanup
481 SET DEBUG_SYNC = 'RESET';
482 UNINSTALL PLUGIN clone;