Debian Codegraph @

mysql-test/suite/parts/r/debug_innodb_crash.result

raw
1 call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was");
2 call mtr.add_suppression("table .* does not exist in the InnoDB internal");
3 call mtr.add_suppression("InnoDB: Warning: MariaDB is trying to drop table ");
4 # Test crash recovery in fast_alter_partition_table.
5 #
6 # Bug#53676: Unexpected errors and possible table corruption on
7 # ADD PARTITION and LOCK TABLE
8 # Bug#53770: Server crash at handler.cc:2076 on LOAD DATA
9 # after timed out COALESCE PARTITION
10 # Extended crash recovery testing of fast_alter_partition_table.
11 call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
12 flush tables;
13 # Crash testing ADD PARTITION
14 SET @save_dbug=@@debug_dbug;
15 SET SESSION debug_dbug="+d,crash_add_partition_1";
16 CREATE TABLE t1 (a INT, b VARCHAR(64))
17 ENGINE = 'InnoDB'
18 PARTITION BY LIST (a)
19 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
20 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
21 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
22 # State before crash
23 db.opt
24 t1#P#p0.ibd
25 t1#P#p10.ibd
26 t1.frm
27 t1.par
28 SHOW CREATE TABLE t1;
29 Table Create Table
30 t1 CREATE TABLE `t1` (
31 `a` int(11) DEFAULT NULL,
32 `b` varchar(64) DEFAULT NULL
33 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
34 PARTITION BY LIST (`a`)
35 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
36 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
37 SELECT * FROM t1;
38 a b
39 1 Original from partition p0
40 11 Original from partition p1
41 12 Original from partition p1
42 13 Original from partition p1
43 14 Original from partition p1
44 2 Original from partition p0
45 3 Original from partition p0
46 4 Original from partition p0
47 ALTER TABLE t1 ADD PARTITION
48 (PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
49 ERROR HY000: Lost connection to server during query
50 # State after crash (before recovery)
51 db.opt
52 t1#P#p0.ibd
53 t1#P#p10.ibd
54 t1.frm
55 t1.par
56 # State after crash recovery
57 db.opt
58 t1#P#p0.ibd
59 t1#P#p10.ibd
60 t1.frm
61 t1.par
62 SHOW CREATE TABLE t1;
63 Table Create Table
64 t1 CREATE TABLE `t1` (
65 `a` int(11) DEFAULT NULL,
66 `b` varchar(64) DEFAULT NULL
67 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
68 PARTITION BY LIST (`a`)
69 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
70 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
71 SELECT * FROM t1;
72 a b
73 1 Original from partition p0
74 11 Original from partition p1
75 12 Original from partition p1
76 13 Original from partition p1
77 14 Original from partition p1
78 2 Original from partition p0
79 3 Original from partition p0
80 4 Original from partition p0
81 DROP TABLE t1;
82 SET SESSION debug_dbug=@save_dbug;
83 SET SESSION debug_dbug="+d,crash_add_partition_2";
84 CREATE TABLE t1 (a INT, b VARCHAR(64))
85 ENGINE = 'InnoDB'
86 PARTITION BY LIST (a)
87 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
88 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
89 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
90 # State before crash
91 db.opt
92 t1#P#p0.ibd
93 t1#P#p10.ibd
94 t1.frm
95 t1.par
96 SHOW CREATE TABLE t1;
97 Table Create Table
98 t1 CREATE TABLE `t1` (
99 `a` int(11) DEFAULT NULL,
100 `b` varchar(64) DEFAULT NULL
101 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
102 PARTITION BY LIST (`a`)
103 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
104 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
105 SELECT * FROM t1;
106 a b
107 1 Original from partition p0
108 11 Original from partition p1
109 12 Original from partition p1
110 13 Original from partition p1
111 14 Original from partition p1
112 2 Original from partition p0
113 3 Original from partition p0
114 4 Original from partition p0
115 ALTER TABLE t1 ADD PARTITION
116 (PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
117 ERROR HY000: Lost connection to server during query
118 # State after crash (before recovery)
119 #sql-shadow-t1.frm
120 #sql-shadow-t1.par
121 db.opt
122 t1#P#p0.ibd
123 t1#P#p10.ibd
124 t1.frm
125 t1.par
126 # State after crash recovery
127 db.opt
128 t1#P#p0.ibd
129 t1#P#p10.ibd
130 t1.frm
131 t1.par
132 SHOW CREATE TABLE t1;
133 Table Create Table
134 t1 CREATE TABLE `t1` (
135 `a` int(11) DEFAULT NULL,
136 `b` varchar(64) DEFAULT NULL
137 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
138 PARTITION BY LIST (`a`)
139 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
140 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
141 SELECT * FROM t1;
142 a b
143 1 Original from partition p0
144 11 Original from partition p1
145 12 Original from partition p1
146 13 Original from partition p1
147 14 Original from partition p1
148 2 Original from partition p0
149 3 Original from partition p0
150 4 Original from partition p0
151 DROP TABLE t1;
152 SET SESSION debug_dbug=@save_dbug;
153 SET SESSION debug_dbug="+d,crash_add_partition_3";
154 CREATE TABLE t1 (a INT, b VARCHAR(64))
155 ENGINE = 'InnoDB'
156 PARTITION BY LIST (a)
157 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
158 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
159 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
160 # State before crash
161 db.opt
162 t1#P#p0.ibd
163 t1#P#p10.ibd
164 t1.frm
165 t1.par
166 SHOW CREATE TABLE t1;
167 Table Create Table
168 t1 CREATE TABLE `t1` (
169 `a` int(11) DEFAULT NULL,
170 `b` varchar(64) DEFAULT NULL
171 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
172 PARTITION BY LIST (`a`)
173 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
174 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
175 SELECT * FROM t1;
176 a b
177 1 Original from partition p0
178 11 Original from partition p1
179 12 Original from partition p1
180 13 Original from partition p1
181 14 Original from partition p1
182 2 Original from partition p0
183 3 Original from partition p0
184 4 Original from partition p0
185 ALTER TABLE t1 ADD PARTITION
186 (PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
187 ERROR HY000: Lost connection to server during query
188 # State after crash (before recovery)
189 #sql-shadow-t1.frm
190 #sql-shadow-t1.par
191 db.opt
192 t1#P#p0.ibd
193 t1#P#p10.ibd
194 t1.frm
195 t1.par
196 # State after crash recovery
197 db.opt
198 t1#P#p0.ibd
199 t1#P#p10.ibd
200 t1.frm
201 t1.par
202 SHOW CREATE TABLE t1;
203 Table Create Table
204 t1 CREATE TABLE `t1` (
205 `a` int(11) DEFAULT NULL,
206 `b` varchar(64) DEFAULT NULL
207 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
208 PARTITION BY LIST (`a`)
209 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
210 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
211 SELECT * FROM t1;
212 a b
213 1 Original from partition p0
214 11 Original from partition p1
215 12 Original from partition p1
216 13 Original from partition p1
217 14 Original from partition p1
218 2 Original from partition p0
219 3 Original from partition p0
220 4 Original from partition p0
221 DROP TABLE t1;
222 SET SESSION debug_dbug=@save_dbug;
223 SET SESSION debug_dbug="+d,crash_add_partition_4";
224 CREATE TABLE t1 (a INT, b VARCHAR(64))
225 ENGINE = 'InnoDB'
226 PARTITION BY LIST (a)
227 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
228 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
229 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
230 # State before crash
231 db.opt
232 t1#P#p0.ibd
233 t1#P#p10.ibd
234 t1.frm
235 t1.par
236 SHOW CREATE TABLE t1;
237 Table Create Table
238 t1 CREATE TABLE `t1` (
239 `a` int(11) DEFAULT NULL,
240 `b` varchar(64) DEFAULT NULL
241 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
242 PARTITION BY LIST (`a`)
243 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
244 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
245 SELECT * FROM t1;
246 a b
247 1 Original from partition p0
248 11 Original from partition p1
249 12 Original from partition p1
250 13 Original from partition p1
251 14 Original from partition p1
252 2 Original from partition p0
253 3 Original from partition p0
254 4 Original from partition p0
255 ALTER TABLE t1 ADD PARTITION
256 (PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
257 ERROR HY000: Lost connection to server during query
258 # State after crash (before recovery)
259 #sql-shadow-t1.frm
260 #sql-shadow-t1.par
261 db.opt
262 t1#P#p0.ibd
263 t1#P#p10.ibd
264 t1.frm
265 t1.par
266 # State after crash recovery
267 db.opt
268 t1#P#p0.ibd
269 t1#P#p10.ibd
270 t1.frm
271 t1.par
272 SHOW CREATE TABLE t1;
273 Table Create Table
274 t1 CREATE TABLE `t1` (
275 `a` int(11) DEFAULT NULL,
276 `b` varchar(64) DEFAULT NULL
277 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
278 PARTITION BY LIST (`a`)
279 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
280 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
281 SELECT * FROM t1;
282 a b
283 1 Original from partition p0
284 11 Original from partition p1
285 12 Original from partition p1
286 13 Original from partition p1
287 14 Original from partition p1
288 2 Original from partition p0
289 3 Original from partition p0
290 4 Original from partition p0
291 DROP TABLE t1;
292 SET SESSION debug_dbug=@save_dbug;
293 SET SESSION debug_dbug="+d,crash_add_partition_5";
294 CREATE TABLE t1 (a INT, b VARCHAR(64))
295 ENGINE = 'InnoDB'
296 PARTITION BY LIST (a)
297 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
298 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
299 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
300 # State before crash
301 db.opt
302 t1#P#p0.ibd
303 t1#P#p10.ibd
304 t1.frm
305 t1.par
306 SHOW CREATE TABLE t1;
307 Table Create Table
308 t1 CREATE TABLE `t1` (
309 `a` int(11) DEFAULT NULL,
310 `b` varchar(64) DEFAULT NULL
311 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
312 PARTITION BY LIST (`a`)
313 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
314 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
315 SELECT * FROM t1;
316 a b
317 1 Original from partition p0
318 11 Original from partition p1
319 12 Original from partition p1
320 13 Original from partition p1
321 14 Original from partition p1
322 2 Original from partition p0
323 3 Original from partition p0
324 4 Original from partition p0
325 ALTER TABLE t1 ADD PARTITION
326 (PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
327 ERROR HY000: Lost connection to server during query
328 # State after crash (before recovery)
329 #sql-shadow-t1.frm
330 #sql-shadow-t1.par
331 db.opt
332 t1#P#p0.ibd
333 t1#P#p10.ibd
334 t1#P#p20.ibd
335 t1.frm
336 t1.par
337 # State after crash recovery
338 db.opt
339 t1#P#p0.ibd
340 t1#P#p10.ibd
341 t1.frm
342 t1.par
343 SHOW CREATE TABLE t1;
344 Table Create Table
345 t1 CREATE TABLE `t1` (
346 `a` int(11) DEFAULT NULL,
347 `b` varchar(64) DEFAULT NULL
348 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
349 PARTITION BY LIST (`a`)
350 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
351 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
352 SELECT * FROM t1;
353 a b
354 1 Original from partition p0
355 11 Original from partition p1
356 12 Original from partition p1
357 13 Original from partition p1
358 14 Original from partition p1
359 2 Original from partition p0
360 3 Original from partition p0
361 4 Original from partition p0
362 DROP TABLE t1;
363 SET SESSION debug_dbug=@save_dbug;
364 SET SESSION debug_dbug="+d,crash_add_partition_6";
365 CREATE TABLE t1 (a INT, b VARCHAR(64))
366 ENGINE = 'InnoDB'
367 PARTITION BY LIST (a)
368 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
369 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
370 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
371 # State before crash
372 db.opt
373 t1#P#p0.ibd
374 t1#P#p10.ibd
375 t1.frm
376 t1.par
377 SHOW CREATE TABLE t1;
378 Table Create Table
379 t1 CREATE TABLE `t1` (
380 `a` int(11) DEFAULT NULL,
381 `b` varchar(64) DEFAULT NULL
382 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
383 PARTITION BY LIST (`a`)
384 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
385 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
386 SELECT * FROM t1;
387 a b
388 1 Original from partition p0
389 11 Original from partition p1
390 12 Original from partition p1
391 13 Original from partition p1
392 14 Original from partition p1
393 2 Original from partition p0
394 3 Original from partition p0
395 4 Original from partition p0
396 ALTER TABLE t1 ADD PARTITION
397 (PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
398 ERROR HY000: Lost connection to server during query
399 # State after crash (before recovery)
400 #sql-shadow-t1.frm
401 #sql-shadow-t1.par
402 db.opt
403 t1#P#p0.ibd
404 t1#P#p10.ibd
405 t1#P#p20.ibd
406 t1.frm
407 t1.par
408 # State after crash recovery
409 db.opt
410 t1#P#p0.ibd
411 t1#P#p10.ibd
412 t1.frm
413 t1.par
414 SHOW CREATE TABLE t1;
415 Table Create Table
416 t1 CREATE TABLE `t1` (
417 `a` int(11) DEFAULT NULL,
418 `b` varchar(64) DEFAULT NULL
419 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
420 PARTITION BY LIST (`a`)
421 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
422 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
423 SELECT * FROM t1;
424 a b
425 1 Original from partition p0
426 11 Original from partition p1
427 12 Original from partition p1
428 13 Original from partition p1
429 14 Original from partition p1
430 2 Original from partition p0
431 3 Original from partition p0
432 4 Original from partition p0
433 DROP TABLE t1;
434 SET SESSION debug_dbug=@save_dbug;
435 SET SESSION debug_dbug="+d,crash_add_partition_7";
436 CREATE TABLE t1 (a INT, b VARCHAR(64))
437 ENGINE = 'InnoDB'
438 PARTITION BY LIST (a)
439 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
440 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
441 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
442 # State before crash
443 db.opt
444 t1#P#p0.ibd
445 t1#P#p10.ibd
446 t1.frm
447 t1.par
448 SHOW CREATE TABLE t1;
449 Table Create Table
450 t1 CREATE TABLE `t1` (
451 `a` int(11) DEFAULT NULL,
452 `b` varchar(64) DEFAULT NULL
453 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
454 PARTITION BY LIST (`a`)
455 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
456 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
457 SELECT * FROM t1;
458 a b
459 1 Original from partition p0
460 11 Original from partition p1
461 12 Original from partition p1
462 13 Original from partition p1
463 14 Original from partition p1
464 2 Original from partition p0
465 3 Original from partition p0
466 4 Original from partition p0
467 ALTER TABLE t1 ADD PARTITION
468 (PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
469 ERROR HY000: Lost connection to server during query
470 # State after crash (before recovery)
471 #sql-shadow-t1.frm
472 #sql-shadow-t1.par
473 db.opt
474 t1#P#p0.ibd
475 t1#P#p10.ibd
476 t1#P#p20.ibd
477 t1.frm
478 t1.par
479 # State after crash recovery
480 db.opt
481 t1#P#p0.ibd
482 t1#P#p10.ibd
483 t1.frm
484 t1.par
485 SHOW CREATE TABLE t1;
486 Table Create Table
487 t1 CREATE TABLE `t1` (
488 `a` int(11) DEFAULT NULL,
489 `b` varchar(64) DEFAULT NULL
490 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
491 PARTITION BY LIST (`a`)
492 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
493 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
494 SELECT * FROM t1;
495 a b
496 1 Original from partition p0
497 11 Original from partition p1
498 12 Original from partition p1
499 13 Original from partition p1
500 14 Original from partition p1
501 2 Original from partition p0
502 3 Original from partition p0
503 4 Original from partition p0
504 DROP TABLE t1;
505 SET SESSION debug_dbug=@save_dbug;
506 SET SESSION debug_dbug="+d,crash_add_partition_8";
507 CREATE TABLE t1 (a INT, b VARCHAR(64))
508 ENGINE = 'InnoDB'
509 PARTITION BY LIST (a)
510 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
511 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
512 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
513 # State before crash
514 db.opt
515 t1#P#p0.ibd
516 t1#P#p10.ibd
517 t1.frm
518 t1.par
519 SHOW CREATE TABLE t1;
520 Table Create Table
521 t1 CREATE TABLE `t1` (
522 `a` int(11) DEFAULT NULL,
523 `b` varchar(64) DEFAULT NULL
524 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
525 PARTITION BY LIST (`a`)
526 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
527 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
528 SELECT * FROM t1;
529 a b
530 1 Original from partition p0
531 11 Original from partition p1
532 12 Original from partition p1
533 13 Original from partition p1
534 14 Original from partition p1
535 2 Original from partition p0
536 3 Original from partition p0
537 4 Original from partition p0
538 ALTER TABLE t1 ADD PARTITION
539 (PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
540 ERROR HY000: Lost connection to server during query
541 # State after crash (before recovery)
542 #sql-shadow-t1.frm
543 #sql-shadow-t1.par
544 db.opt
545 t1#P#p0.ibd
546 t1#P#p10.ibd
547 t1#P#p20.ibd
548 t1.frm
549 t1.par
550 # State after crash recovery
551 db.opt
552 t1#P#p0.ibd
553 t1#P#p10.ibd
554 t1#P#p20.ibd
555 t1.frm
556 t1.par
557 SHOW CREATE TABLE t1;
558 Table Create Table
559 t1 CREATE TABLE `t1` (
560 `a` int(11) DEFAULT NULL,
561 `b` varchar(64) DEFAULT NULL
562 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
563 PARTITION BY LIST (`a`)
564 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
565 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
566 PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
567 SELECT * FROM t1;
568 a b
569 1 Original from partition p0
570 11 Original from partition p1
571 12 Original from partition p1
572 13 Original from partition p1
573 14 Original from partition p1
574 2 Original from partition p0
575 3 Original from partition p0
576 4 Original from partition p0
577 DROP TABLE t1;
578 SET SESSION debug_dbug=@save_dbug;
579 SET SESSION debug_dbug="+d,crash_add_partition_9";
580 CREATE TABLE t1 (a INT, b VARCHAR(64))
581 ENGINE = 'InnoDB'
582 PARTITION BY LIST (a)
583 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
584 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
585 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
586 # State before crash
587 db.opt
588 t1#P#p0.ibd
589 t1#P#p10.ibd
590 t1.frm
591 t1.par
592 SHOW CREATE TABLE t1;
593 Table Create Table
594 t1 CREATE TABLE `t1` (
595 `a` int(11) DEFAULT NULL,
596 `b` varchar(64) DEFAULT NULL
597 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
598 PARTITION BY LIST (`a`)
599 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
600 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
601 SELECT * FROM t1;
602 a b
603 1 Original from partition p0
604 11 Original from partition p1
605 12 Original from partition p1
606 13 Original from partition p1
607 14 Original from partition p1
608 2 Original from partition p0
609 3 Original from partition p0
610 4 Original from partition p0
611 ALTER TABLE t1 ADD PARTITION
612 (PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
613 ERROR HY000: Lost connection to server during query
614 # State after crash (before recovery)
615 db.opt
616 t1#P#p0.ibd
617 t1#P#p10.ibd
618 t1#P#p20.ibd
619 t1.frm
620 t1.par
621 # State after crash recovery
622 db.opt
623 t1#P#p0.ibd
624 t1#P#p10.ibd
625 t1#P#p20.ibd
626 t1.frm
627 t1.par
628 SHOW CREATE TABLE t1;
629 Table Create Table
630 t1 CREATE TABLE `t1` (
631 `a` int(11) DEFAULT NULL,
632 `b` varchar(64) DEFAULT NULL
633 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
634 PARTITION BY LIST (`a`)
635 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
636 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
637 PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
638 SELECT * FROM t1;
639 a b
640 1 Original from partition p0
641 11 Original from partition p1
642 12 Original from partition p1
643 13 Original from partition p1
644 14 Original from partition p1
645 2 Original from partition p0
646 3 Original from partition p0
647 4 Original from partition p0
648 DROP TABLE t1;
649 SET SESSION debug_dbug=@save_dbug;
650 SET SESSION debug_dbug="+d,crash_add_partition_10";
651 CREATE TABLE t1 (a INT, b VARCHAR(64))
652 ENGINE = 'InnoDB'
653 PARTITION BY LIST (a)
654 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
655 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
656 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
657 # State before crash
658 db.opt
659 t1#P#p0.ibd
660 t1#P#p10.ibd
661 t1.frm
662 t1.par
663 SHOW CREATE TABLE t1;
664 Table Create Table
665 t1 CREATE TABLE `t1` (
666 `a` int(11) DEFAULT NULL,
667 `b` varchar(64) DEFAULT NULL
668 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
669 PARTITION BY LIST (`a`)
670 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
671 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
672 SELECT * FROM t1;
673 a b
674 1 Original from partition p0
675 11 Original from partition p1
676 12 Original from partition p1
677 13 Original from partition p1
678 14 Original from partition p1
679 2 Original from partition p0
680 3 Original from partition p0
681 4 Original from partition p0
682 ALTER TABLE t1 ADD PARTITION
683 (PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
684 ERROR HY000: Lost connection to server during query
685 # State after crash (before recovery)
686 db.opt
687 t1#P#p0.ibd
688 t1#P#p10.ibd
689 t1#P#p20.ibd
690 t1.frm
691 t1.par
692 # State after crash recovery
693 db.opt
694 t1#P#p0.ibd
695 t1#P#p10.ibd
696 t1#P#p20.ibd
697 t1.frm
698 t1.par
699 SHOW CREATE TABLE t1;
700 Table Create Table
701 t1 CREATE TABLE `t1` (
702 `a` int(11) DEFAULT NULL,
703 `b` varchar(64) DEFAULT NULL
704 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
705 PARTITION BY LIST (`a`)
706 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
707 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
708 PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
709 SELECT * FROM t1;
710 a b
711 1 Original from partition p0
712 11 Original from partition p1
713 12 Original from partition p1
714 13 Original from partition p1
715 14 Original from partition p1
716 2 Original from partition p0
717 3 Original from partition p0
718 4 Original from partition p0
719 DROP TABLE t1;
720 SET SESSION debug_dbug=@save_dbug;
721 # Test DROP PARTITION
722 SET @save_dbug=@@debug_dbug;
723 SET SESSION debug_dbug="+d,crash_drop_partition_1";
724 CREATE TABLE t1 (a INT, b VARCHAR(64))
725 ENGINE = 'InnoDB'
726 PARTITION BY LIST (a)
727 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
728 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
729 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
730 # State before crash
731 db.opt
732 t1#P#p0.ibd
733 t1#P#p10.ibd
734 t1.frm
735 t1.par
736 SHOW CREATE TABLE t1;
737 Table Create Table
738 t1 CREATE TABLE `t1` (
739 `a` int(11) DEFAULT NULL,
740 `b` varchar(64) DEFAULT NULL
741 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
742 PARTITION BY LIST (`a`)
743 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
744 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
745 SELECT * FROM t1;
746 a b
747 1 Original from partition p0
748 11 Original from partition p1
749 12 Original from partition p1
750 13 Original from partition p1
751 14 Original from partition p1
752 2 Original from partition p0
753 3 Original from partition p0
754 4 Original from partition p0
755 ALTER TABLE t1 DROP PARTITION p10;
756 ERROR HY000: Lost connection to server during query
757 # State after crash (before recovery)
758 db.opt
759 t1#P#p0.ibd
760 t1#P#p10.ibd
761 t1.frm
762 t1.par
763 # State after crash recovery
764 db.opt
765 t1#P#p0.ibd
766 t1#P#p10.ibd
767 t1.frm
768 t1.par
769 SHOW CREATE TABLE t1;
770 Table Create Table
771 t1 CREATE TABLE `t1` (
772 `a` int(11) DEFAULT NULL,
773 `b` varchar(64) DEFAULT NULL
774 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
775 PARTITION BY LIST (`a`)
776 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
777 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
778 SELECT * FROM t1;
779 a b
780 1 Original from partition p0
781 11 Original from partition p1
782 12 Original from partition p1
783 13 Original from partition p1
784 14 Original from partition p1
785 2 Original from partition p0
786 3 Original from partition p0
787 4 Original from partition p0
788 DROP TABLE t1;
789 SET SESSION debug_dbug=@save_dbug;
790 SET SESSION debug_dbug="+d,crash_drop_partition_2";
791 CREATE TABLE t1 (a INT, b VARCHAR(64))
792 ENGINE = 'InnoDB'
793 PARTITION BY LIST (a)
794 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
795 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
796 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
797 # State before crash
798 db.opt
799 t1#P#p0.ibd
800 t1#P#p10.ibd
801 t1.frm
802 t1.par
803 SHOW CREATE TABLE t1;
804 Table Create Table
805 t1 CREATE TABLE `t1` (
806 `a` int(11) DEFAULT NULL,
807 `b` varchar(64) DEFAULT NULL
808 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
809 PARTITION BY LIST (`a`)
810 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
811 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
812 SELECT * FROM t1;
813 a b
814 1 Original from partition p0
815 11 Original from partition p1
816 12 Original from partition p1
817 13 Original from partition p1
818 14 Original from partition p1
819 2 Original from partition p0
820 3 Original from partition p0
821 4 Original from partition p0
822 ALTER TABLE t1 DROP PARTITION p10;
823 ERROR HY000: Lost connection to server during query
824 # State after crash (before recovery)
825 #sql-shadow-t1.frm
826 #sql-shadow-t1.par
827 db.opt
828 t1#P#p0.ibd
829 t1#P#p10.ibd
830 t1.frm
831 t1.par
832 # State after crash recovery
833 db.opt
834 t1#P#p0.ibd
835 t1#P#p10.ibd
836 t1.frm
837 t1.par
838 SHOW CREATE TABLE t1;
839 Table Create Table
840 t1 CREATE TABLE `t1` (
841 `a` int(11) DEFAULT NULL,
842 `b` varchar(64) DEFAULT NULL
843 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
844 PARTITION BY LIST (`a`)
845 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
846 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
847 SELECT * FROM t1;
848 a b
849 1 Original from partition p0
850 11 Original from partition p1
851 12 Original from partition p1
852 13 Original from partition p1
853 14 Original from partition p1
854 2 Original from partition p0
855 3 Original from partition p0
856 4 Original from partition p0
857 DROP TABLE t1;
858 SET SESSION debug_dbug=@save_dbug;
859 SET SESSION debug_dbug="+d,crash_drop_partition_3";
860 CREATE TABLE t1 (a INT, b VARCHAR(64))
861 ENGINE = 'InnoDB'
862 PARTITION BY LIST (a)
863 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
864 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
865 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
866 # State before crash
867 db.opt
868 t1#P#p0.ibd
869 t1#P#p10.ibd
870 t1.frm
871 t1.par
872 SHOW CREATE TABLE t1;
873 Table Create Table
874 t1 CREATE TABLE `t1` (
875 `a` int(11) DEFAULT NULL,
876 `b` varchar(64) DEFAULT NULL
877 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
878 PARTITION BY LIST (`a`)
879 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
880 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
881 SELECT * FROM t1;
882 a b
883 1 Original from partition p0
884 11 Original from partition p1
885 12 Original from partition p1
886 13 Original from partition p1
887 14 Original from partition p1
888 2 Original from partition p0
889 3 Original from partition p0
890 4 Original from partition p0
891 ALTER TABLE t1 DROP PARTITION p10;
892 ERROR HY000: Lost connection to server during query
893 # State after crash (before recovery)
894 #sql-shadow-t1.frm
895 #sql-shadow-t1.par
896 db.opt
897 t1#P#p0.ibd
898 t1#P#p10.ibd
899 t1.frm
900 t1.par
901 # State after crash recovery
902 db.opt
903 t1#P#p0.ibd
904 t1#P#p10.ibd
905 t1.frm
906 t1.par
907 SHOW CREATE TABLE t1;
908 Table Create Table
909 t1 CREATE TABLE `t1` (
910 `a` int(11) DEFAULT NULL,
911 `b` varchar(64) DEFAULT NULL
912 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
913 PARTITION BY LIST (`a`)
914 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
915 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
916 SELECT * FROM t1;
917 a b
918 1 Original from partition p0
919 11 Original from partition p1
920 12 Original from partition p1
921 13 Original from partition p1
922 14 Original from partition p1
923 2 Original from partition p0
924 3 Original from partition p0
925 4 Original from partition p0
926 DROP TABLE t1;
927 SET SESSION debug_dbug=@save_dbug;
928 SET SESSION debug_dbug="+d,crash_drop_partition_4";
929 CREATE TABLE t1 (a INT, b VARCHAR(64))
930 ENGINE = 'InnoDB'
931 PARTITION BY LIST (a)
932 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
933 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
934 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
935 # State before crash
936 db.opt
937 t1#P#p0.ibd
938 t1#P#p10.ibd
939 t1.frm
940 t1.par
941 SHOW CREATE TABLE t1;
942 Table Create Table
943 t1 CREATE TABLE `t1` (
944 `a` int(11) DEFAULT NULL,
945 `b` varchar(64) DEFAULT NULL
946 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
947 PARTITION BY LIST (`a`)
948 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
949 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
950 SELECT * FROM t1;
951 a b
952 1 Original from partition p0
953 11 Original from partition p1
954 12 Original from partition p1
955 13 Original from partition p1
956 14 Original from partition p1
957 2 Original from partition p0
958 3 Original from partition p0
959 4 Original from partition p0
960 ALTER TABLE t1 DROP PARTITION p10;
961 ERROR HY000: Lost connection to server during query
962 # State after crash (before recovery)
963 #sql-shadow-t1.frm
964 #sql-shadow-t1.par
965 db.opt
966 t1#P#p0.ibd
967 t1#P#p10.ibd
968 t1.frm
969 t1.par
970 # State after crash recovery
971 db.opt
972 t1#P#p0.ibd
973 t1.frm
974 t1.par
975 SHOW CREATE TABLE t1;
976 Table Create Table
977 t1 CREATE TABLE `t1` (
978 `a` int(11) DEFAULT NULL,
979 `b` varchar(64) DEFAULT NULL
980 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
981 PARTITION BY LIST (`a`)
982 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
983 SELECT * FROM t1;
984 a b
985 1 Original from partition p0
986 2 Original from partition p0
987 3 Original from partition p0
988 4 Original from partition p0
989 DROP TABLE t1;
990 SET SESSION debug_dbug=@save_dbug;
991 SET SESSION debug_dbug="+d,crash_drop_partition_5";
992 CREATE TABLE t1 (a INT, b VARCHAR(64))
993 ENGINE = 'InnoDB'
994 PARTITION BY LIST (a)
995 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
996 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
997 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
998 # State before crash
999 db.opt
1000 t1#P#p0.ibd
1001 t1#P#p10.ibd
1002 t1.frm
1003 t1.par
1004 SHOW CREATE TABLE t1;
1005 Table Create Table
1006 t1 CREATE TABLE `t1` (
1007 `a` int(11) DEFAULT NULL,
1008 `b` varchar(64) DEFAULT NULL
1009 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1010 PARTITION BY LIST (`a`)
1011 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1012 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1013 SELECT * FROM t1;
1014 a b
1015 1 Original from partition p0
1016 11 Original from partition p1
1017 12 Original from partition p1
1018 13 Original from partition p1
1019 14 Original from partition p1
1020 2 Original from partition p0
1021 3 Original from partition p0
1022 4 Original from partition p0
1023 ALTER TABLE t1 DROP PARTITION p10;
1024 ERROR HY000: Lost connection to server during query
1025 # State after crash (before recovery)
1026 #sql-shadow-t1.frm
1027 #sql-shadow-t1.par
1028 db.opt
1029 t1#P#p0.ibd
1030 t1#P#p10.ibd
1031 t1.frm
1032 t1.par
1033 # State after crash recovery
1034 db.opt
1035 t1#P#p0.ibd
1036 t1.frm
1037 t1.par
1038 SHOW CREATE TABLE t1;
1039 Table Create Table
1040 t1 CREATE TABLE `t1` (
1041 `a` int(11) DEFAULT NULL,
1042 `b` varchar(64) DEFAULT NULL
1043 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1044 PARTITION BY LIST (`a`)
1045 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
1046 SELECT * FROM t1;
1047 a b
1048 1 Original from partition p0
1049 2 Original from partition p0
1050 3 Original from partition p0
1051 4 Original from partition p0
1052 DROP TABLE t1;
1053 SET SESSION debug_dbug=@save_dbug;
1054 SET SESSION debug_dbug="+d,crash_drop_partition_6";
1055 CREATE TABLE t1 (a INT, b VARCHAR(64))
1056 ENGINE = 'InnoDB'
1057 PARTITION BY LIST (a)
1058 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1059 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1060 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1061 # State before crash
1062 db.opt
1063 t1#P#p0.ibd
1064 t1#P#p10.ibd
1065 t1.frm
1066 t1.par
1067 SHOW CREATE TABLE t1;
1068 Table Create Table
1069 t1 CREATE TABLE `t1` (
1070 `a` int(11) DEFAULT NULL,
1071 `b` varchar(64) DEFAULT NULL
1072 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1073 PARTITION BY LIST (`a`)
1074 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1075 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1076 SELECT * FROM t1;
1077 a b
1078 1 Original from partition p0
1079 11 Original from partition p1
1080 12 Original from partition p1
1081 13 Original from partition p1
1082 14 Original from partition p1
1083 2 Original from partition p0
1084 3 Original from partition p0
1085 4 Original from partition p0
1086 ALTER TABLE t1 DROP PARTITION p10;
1087 ERROR HY000: Lost connection to server during query
1088 # State after crash (before recovery)
1089 #sql-shadow-t1.frm
1090 #sql-shadow-t1.par
1091 db.opt
1092 t1#P#p0.ibd
1093 t1#P#p10.ibd
1094 t1.frm
1095 t1.par
1096 # State after crash recovery
1097 db.opt
1098 t1#P#p0.ibd
1099 t1.frm
1100 t1.par
1101 SHOW CREATE TABLE t1;
1102 Table Create Table
1103 t1 CREATE TABLE `t1` (
1104 `a` int(11) DEFAULT NULL,
1105 `b` varchar(64) DEFAULT NULL
1106 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1107 PARTITION BY LIST (`a`)
1108 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
1109 SELECT * FROM t1;
1110 a b
1111 1 Original from partition p0
1112 2 Original from partition p0
1113 3 Original from partition p0
1114 4 Original from partition p0
1115 DROP TABLE t1;
1116 SET SESSION debug_dbug=@save_dbug;
1117 SET SESSION debug_dbug="+d,crash_drop_partition_7";
1118 CREATE TABLE t1 (a INT, b VARCHAR(64))
1119 ENGINE = 'InnoDB'
1120 PARTITION BY LIST (a)
1121 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1122 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1123 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1124 # State before crash
1125 db.opt
1126 t1#P#p0.ibd
1127 t1#P#p10.ibd
1128 t1.frm
1129 t1.par
1130 SHOW CREATE TABLE t1;
1131 Table Create Table
1132 t1 CREATE TABLE `t1` (
1133 `a` int(11) DEFAULT NULL,
1134 `b` varchar(64) DEFAULT NULL
1135 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1136 PARTITION BY LIST (`a`)
1137 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1138 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1139 SELECT * FROM t1;
1140 a b
1141 1 Original from partition p0
1142 11 Original from partition p1
1143 12 Original from partition p1
1144 13 Original from partition p1
1145 14 Original from partition p1
1146 2 Original from partition p0
1147 3 Original from partition p0
1148 4 Original from partition p0
1149 ALTER TABLE t1 DROP PARTITION p10;
1150 ERROR HY000: Lost connection to server during query
1151 # State after crash (before recovery)
1152 db.opt
1153 t1#P#p0.ibd
1154 t1#P#p10.ibd
1155 t1.frm
1156 t1.par
1157 # State after crash recovery
1158 db.opt
1159 t1#P#p0.ibd
1160 t1.frm
1161 t1.par
1162 SHOW CREATE TABLE t1;
1163 Table Create Table
1164 t1 CREATE TABLE `t1` (
1165 `a` int(11) DEFAULT NULL,
1166 `b` varchar(64) DEFAULT NULL
1167 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1168 PARTITION BY LIST (`a`)
1169 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
1170 SELECT * FROM t1;
1171 a b
1172 1 Original from partition p0
1173 2 Original from partition p0
1174 3 Original from partition p0
1175 4 Original from partition p0
1176 DROP TABLE t1;
1177 SET SESSION debug_dbug=@save_dbug;
1178 SET SESSION debug_dbug="+d,crash_drop_partition_8";
1179 CREATE TABLE t1 (a INT, b VARCHAR(64))
1180 ENGINE = 'InnoDB'
1181 PARTITION BY LIST (a)
1182 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1183 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1184 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1185 # State before crash
1186 db.opt
1187 t1#P#p0.ibd
1188 t1#P#p10.ibd
1189 t1.frm
1190 t1.par
1191 SHOW CREATE TABLE t1;
1192 Table Create Table
1193 t1 CREATE TABLE `t1` (
1194 `a` int(11) DEFAULT NULL,
1195 `b` varchar(64) DEFAULT NULL
1196 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1197 PARTITION BY LIST (`a`)
1198 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1199 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1200 SELECT * FROM t1;
1201 a b
1202 1 Original from partition p0
1203 11 Original from partition p1
1204 12 Original from partition p1
1205 13 Original from partition p1
1206 14 Original from partition p1
1207 2 Original from partition p0
1208 3 Original from partition p0
1209 4 Original from partition p0
1210 ALTER TABLE t1 DROP PARTITION p10;
1211 ERROR HY000: Lost connection to server during query
1212 # State after crash (before recovery)
1213 db.opt
1214 t1#P#p0.ibd
1215 t1.frm
1216 t1.par
1217 # State after crash recovery
1218 db.opt
1219 t1#P#p0.ibd
1220 t1.frm
1221 t1.par
1222 SHOW CREATE TABLE t1;
1223 Table Create Table
1224 t1 CREATE TABLE `t1` (
1225 `a` int(11) DEFAULT NULL,
1226 `b` varchar(64) DEFAULT NULL
1227 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1228 PARTITION BY LIST (`a`)
1229 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
1230 SELECT * FROM t1;
1231 a b
1232 1 Original from partition p0
1233 2 Original from partition p0
1234 3 Original from partition p0
1235 4 Original from partition p0
1236 DROP TABLE t1;
1237 SET SESSION debug_dbug=@save_dbug;
1238 SET SESSION debug_dbug="+d,crash_drop_partition_9";
1239 CREATE TABLE t1 (a INT, b VARCHAR(64))
1240 ENGINE = 'InnoDB'
1241 PARTITION BY LIST (a)
1242 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1243 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1244 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1245 # State before crash
1246 db.opt
1247 t1#P#p0.ibd
1248 t1#P#p10.ibd
1249 t1.frm
1250 t1.par
1251 SHOW CREATE TABLE t1;
1252 Table Create Table
1253 t1 CREATE TABLE `t1` (
1254 `a` int(11) DEFAULT NULL,
1255 `b` varchar(64) DEFAULT NULL
1256 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1257 PARTITION BY LIST (`a`)
1258 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1259 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1260 SELECT * FROM t1;
1261 a b
1262 1 Original from partition p0
1263 11 Original from partition p1
1264 12 Original from partition p1
1265 13 Original from partition p1
1266 14 Original from partition p1
1267 2 Original from partition p0
1268 3 Original from partition p0
1269 4 Original from partition p0
1270 ALTER TABLE t1 DROP PARTITION p10;
1271 ERROR HY000: Lost connection to server during query
1272 # State after crash (before recovery)
1273 db.opt
1274 t1#P#p0.ibd
1275 t1.frm
1276 t1.par
1277 # State after crash recovery
1278 db.opt
1279 t1#P#p0.ibd
1280 t1.frm
1281 t1.par
1282 SHOW CREATE TABLE t1;
1283 Table Create Table
1284 t1 CREATE TABLE `t1` (
1285 `a` int(11) DEFAULT NULL,
1286 `b` varchar(64) DEFAULT NULL
1287 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1288 PARTITION BY LIST (`a`)
1289 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
1290 SELECT * FROM t1;
1291 a b
1292 1 Original from partition p0
1293 2 Original from partition p0
1294 3 Original from partition p0
1295 4 Original from partition p0
1296 DROP TABLE t1;
1297 SET SESSION debug_dbug=@save_dbug;
1298 # Test change partition (REORGANIZE/REBUILD/COALESCE
1299 # or ADD HASH PARTITION).
1300 SET @save_dbug=@@debug_dbug;
1301 SET SESSION debug_dbug="+d,crash_change_partition_1";
1302 CREATE TABLE t1 (a INT, b VARCHAR(64))
1303 ENGINE = 'InnoDB'
1304 PARTITION BY LIST (a)
1305 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1306 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1307 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1308 # State before crash
1309 db.opt
1310 t1#P#p0.ibd
1311 t1#P#p10.ibd
1312 t1.frm
1313 t1.par
1314 SHOW CREATE TABLE t1;
1315 Table Create Table
1316 t1 CREATE TABLE `t1` (
1317 `a` int(11) DEFAULT NULL,
1318 `b` varchar(64) DEFAULT NULL
1319 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1320 PARTITION BY LIST (`a`)
1321 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1322 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1323 SELECT * FROM t1;
1324 a b
1325 1 Original from partition p0
1326 11 Original from partition p1
1327 12 Original from partition p1
1328 13 Original from partition p1
1329 14 Original from partition p1
1330 2 Original from partition p0
1331 3 Original from partition p0
1332 4 Original from partition p0
1333 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
1334 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
1335 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
1336 ERROR HY000: Lost connection to server during query
1337 # State after crash (before recovery)
1338 db.opt
1339 t1#P#p0.ibd
1340 t1#P#p10.ibd
1341 t1.frm
1342 t1.par
1343 # State after crash recovery
1344 db.opt
1345 t1#P#p0.ibd
1346 t1#P#p10.ibd
1347 t1.frm
1348 t1.par
1349 SHOW CREATE TABLE t1;
1350 Table Create Table
1351 t1 CREATE TABLE `t1` (
1352 `a` int(11) DEFAULT NULL,
1353 `b` varchar(64) DEFAULT NULL
1354 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1355 PARTITION BY LIST (`a`)
1356 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1357 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1358 SELECT * FROM t1;
1359 a b
1360 1 Original from partition p0
1361 11 Original from partition p1
1362 12 Original from partition p1
1363 13 Original from partition p1
1364 14 Original from partition p1
1365 2 Original from partition p0
1366 3 Original from partition p0
1367 4 Original from partition p0
1368 DROP TABLE t1;
1369 SET SESSION debug_dbug=@save_dbug;
1370 SET SESSION debug_dbug="+d,crash_change_partition_2";
1371 CREATE TABLE t1 (a INT, b VARCHAR(64))
1372 ENGINE = 'InnoDB'
1373 PARTITION BY LIST (a)
1374 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1375 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1376 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1377 # State before crash
1378 db.opt
1379 t1#P#p0.ibd
1380 t1#P#p10.ibd
1381 t1.frm
1382 t1.par
1383 SHOW CREATE TABLE t1;
1384 Table Create Table
1385 t1 CREATE TABLE `t1` (
1386 `a` int(11) DEFAULT NULL,
1387 `b` varchar(64) DEFAULT NULL
1388 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1389 PARTITION BY LIST (`a`)
1390 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1391 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1392 SELECT * FROM t1;
1393 a b
1394 1 Original from partition p0
1395 11 Original from partition p1
1396 12 Original from partition p1
1397 13 Original from partition p1
1398 14 Original from partition p1
1399 2 Original from partition p0
1400 3 Original from partition p0
1401 4 Original from partition p0
1402 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
1403 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
1404 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
1405 ERROR HY000: Lost connection to server during query
1406 # State after crash (before recovery)
1407 #sql-shadow-t1.frm
1408 #sql-shadow-t1.par
1409 db.opt
1410 t1#P#p0.ibd
1411 t1#P#p10.ibd
1412 t1.frm
1413 t1.par
1414 # State after crash recovery
1415 db.opt
1416 t1#P#p0.ibd
1417 t1#P#p10.ibd
1418 t1.frm
1419 t1.par
1420 SHOW CREATE TABLE t1;
1421 Table Create Table
1422 t1 CREATE TABLE `t1` (
1423 `a` int(11) DEFAULT NULL,
1424 `b` varchar(64) DEFAULT NULL
1425 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1426 PARTITION BY LIST (`a`)
1427 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1428 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1429 SELECT * FROM t1;
1430 a b
1431 1 Original from partition p0
1432 11 Original from partition p1
1433 12 Original from partition p1
1434 13 Original from partition p1
1435 14 Original from partition p1
1436 2 Original from partition p0
1437 3 Original from partition p0
1438 4 Original from partition p0
1439 DROP TABLE t1;
1440 SET SESSION debug_dbug=@save_dbug;
1441 SET SESSION debug_dbug="+d,crash_change_partition_3";
1442 CREATE TABLE t1 (a INT, b VARCHAR(64))
1443 ENGINE = 'InnoDB'
1444 PARTITION BY LIST (a)
1445 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1446 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1447 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1448 # State before crash
1449 db.opt
1450 t1#P#p0.ibd
1451 t1#P#p10.ibd
1452 t1.frm
1453 t1.par
1454 SHOW CREATE TABLE t1;
1455 Table Create Table
1456 t1 CREATE TABLE `t1` (
1457 `a` int(11) DEFAULT NULL,
1458 `b` varchar(64) DEFAULT NULL
1459 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1460 PARTITION BY LIST (`a`)
1461 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1462 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1463 SELECT * FROM t1;
1464 a b
1465 1 Original from partition p0
1466 11 Original from partition p1
1467 12 Original from partition p1
1468 13 Original from partition p1
1469 14 Original from partition p1
1470 2 Original from partition p0
1471 3 Original from partition p0
1472 4 Original from partition p0
1473 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
1474 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
1475 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
1476 ERROR HY000: Lost connection to server during query
1477 # State after crash (before recovery)
1478 #sql-shadow-t1.frm
1479 #sql-shadow-t1.par
1480 db.opt
1481 t1#P#p0.ibd
1482 t1#P#p10.ibd
1483 t1.frm
1484 t1.par
1485 # State after crash recovery
1486 db.opt
1487 t1#P#p0.ibd
1488 t1#P#p10.ibd
1489 t1.frm
1490 t1.par
1491 SHOW CREATE TABLE t1;
1492 Table Create Table
1493 t1 CREATE TABLE `t1` (
1494 `a` int(11) DEFAULT NULL,
1495 `b` varchar(64) DEFAULT NULL
1496 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1497 PARTITION BY LIST (`a`)
1498 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1499 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1500 SELECT * FROM t1;
1501 a b
1502 1 Original from partition p0
1503 11 Original from partition p1
1504 12 Original from partition p1
1505 13 Original from partition p1
1506 14 Original from partition p1
1507 2 Original from partition p0
1508 3 Original from partition p0
1509 4 Original from partition p0
1510 DROP TABLE t1;
1511 SET SESSION debug_dbug=@save_dbug;
1512 SET SESSION debug_dbug="+d,crash_change_partition_4";
1513 CREATE TABLE t1 (a INT, b VARCHAR(64))
1514 ENGINE = 'InnoDB'
1515 PARTITION BY LIST (a)
1516 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1517 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1518 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1519 # State before crash
1520 db.opt
1521 t1#P#p0.ibd
1522 t1#P#p10.ibd
1523 t1.frm
1524 t1.par
1525 SHOW CREATE TABLE t1;
1526 Table Create Table
1527 t1 CREATE TABLE `t1` (
1528 `a` int(11) DEFAULT NULL,
1529 `b` varchar(64) DEFAULT NULL
1530 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1531 PARTITION BY LIST (`a`)
1532 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1533 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1534 SELECT * FROM t1;
1535 a b
1536 1 Original from partition p0
1537 11 Original from partition p1
1538 12 Original from partition p1
1539 13 Original from partition p1
1540 14 Original from partition p1
1541 2 Original from partition p0
1542 3 Original from partition p0
1543 4 Original from partition p0
1544 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
1545 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
1546 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
1547 ERROR HY000: Lost connection to server during query
1548 # State after crash (before recovery)
1549 #sql-shadow-t1.frm
1550 #sql-shadow-t1.par
1551 db.opt
1552 t1#P#p0.ibd
1553 t1#P#p10#TMP#.ibd
1554 t1#P#p10.ibd
1555 t1#P#p20#TMP#.ibd
1556 t1.frm
1557 t1.par
1558 # State after crash recovery
1559 db.opt
1560 t1#P#p0.ibd
1561 t1#P#p10.ibd
1562 t1.frm
1563 t1.par
1564 SHOW CREATE TABLE t1;
1565 Table Create Table
1566 t1 CREATE TABLE `t1` (
1567 `a` int(11) DEFAULT NULL,
1568 `b` varchar(64) DEFAULT NULL
1569 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1570 PARTITION BY LIST (`a`)
1571 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1572 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1573 SELECT * FROM t1;
1574 a b
1575 1 Original from partition p0
1576 11 Original from partition p1
1577 12 Original from partition p1
1578 13 Original from partition p1
1579 14 Original from partition p1
1580 2 Original from partition p0
1581 3 Original from partition p0
1582 4 Original from partition p0
1583 DROP TABLE t1;
1584 SET SESSION debug_dbug=@save_dbug;
1585 SET SESSION debug_dbug="+d,crash_change_partition_5";
1586 CREATE TABLE t1 (a INT, b VARCHAR(64))
1587 ENGINE = 'InnoDB'
1588 PARTITION BY LIST (a)
1589 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1590 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1591 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1592 # State before crash
1593 db.opt
1594 t1#P#p0.ibd
1595 t1#P#p10.ibd
1596 t1.frm
1597 t1.par
1598 SHOW CREATE TABLE t1;
1599 Table Create Table
1600 t1 CREATE TABLE `t1` (
1601 `a` int(11) DEFAULT NULL,
1602 `b` varchar(64) DEFAULT NULL
1603 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1604 PARTITION BY LIST (`a`)
1605 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1606 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1607 SELECT * FROM t1;
1608 a b
1609 1 Original from partition p0
1610 11 Original from partition p1
1611 12 Original from partition p1
1612 13 Original from partition p1
1613 14 Original from partition p1
1614 2 Original from partition p0
1615 3 Original from partition p0
1616 4 Original from partition p0
1617 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
1618 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
1619 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
1620 ERROR HY000: Lost connection to server during query
1621 # State after crash (before recovery)
1622 #sql-shadow-t1.frm
1623 #sql-shadow-t1.par
1624 db.opt
1625 t1#P#p0.ibd
1626 t1#P#p10#TMP#.ibd
1627 t1#P#p10.ibd
1628 t1#P#p20#TMP#.ibd
1629 t1.frm
1630 t1.par
1631 # State after crash recovery
1632 db.opt
1633 t1#P#p0.ibd
1634 t1#P#p10.ibd
1635 t1.frm
1636 t1.par
1637 SHOW CREATE TABLE t1;
1638 Table Create Table
1639 t1 CREATE TABLE `t1` (
1640 `a` int(11) DEFAULT NULL,
1641 `b` varchar(64) DEFAULT NULL
1642 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1643 PARTITION BY LIST (`a`)
1644 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1645 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1646 SELECT * FROM t1;
1647 a b
1648 1 Original from partition p0
1649 11 Original from partition p1
1650 12 Original from partition p1
1651 13 Original from partition p1
1652 14 Original from partition p1
1653 2 Original from partition p0
1654 3 Original from partition p0
1655 4 Original from partition p0
1656 DROP TABLE t1;
1657 SET SESSION debug_dbug=@save_dbug;
1658 SET SESSION debug_dbug="+d,crash_change_partition_6";
1659 CREATE TABLE t1 (a INT, b VARCHAR(64))
1660 ENGINE = 'InnoDB'
1661 PARTITION BY LIST (a)
1662 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1663 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1664 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1665 # State before crash
1666 db.opt
1667 t1#P#p0.ibd
1668 t1#P#p10.ibd
1669 t1.frm
1670 t1.par
1671 SHOW CREATE TABLE t1;
1672 Table Create Table
1673 t1 CREATE TABLE `t1` (
1674 `a` int(11) DEFAULT NULL,
1675 `b` varchar(64) DEFAULT NULL
1676 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1677 PARTITION BY LIST (`a`)
1678 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1679 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1680 SELECT * FROM t1;
1681 a b
1682 1 Original from partition p0
1683 11 Original from partition p1
1684 12 Original from partition p1
1685 13 Original from partition p1
1686 14 Original from partition p1
1687 2 Original from partition p0
1688 3 Original from partition p0
1689 4 Original from partition p0
1690 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
1691 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
1692 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
1693 ERROR HY000: Lost connection to server during query
1694 # State after crash (before recovery)
1695 #sql-shadow-t1.frm
1696 #sql-shadow-t1.par
1697 db.opt
1698 t1#P#p0.ibd
1699 t1#P#p10#TMP#.ibd
1700 t1#P#p10.ibd
1701 t1#P#p20#TMP#.ibd
1702 t1.frm
1703 t1.par
1704 # State after crash recovery
1705 db.opt
1706 t1#P#p0.ibd
1707 t1#P#p10.ibd
1708 t1.frm
1709 t1.par
1710 SHOW CREATE TABLE t1;
1711 Table Create Table
1712 t1 CREATE TABLE `t1` (
1713 `a` int(11) DEFAULT NULL,
1714 `b` varchar(64) DEFAULT NULL
1715 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1716 PARTITION BY LIST (`a`)
1717 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1718 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1719 SELECT * FROM t1;
1720 a b
1721 1 Original from partition p0
1722 11 Original from partition p1
1723 12 Original from partition p1
1724 13 Original from partition p1
1725 14 Original from partition p1
1726 2 Original from partition p0
1727 3 Original from partition p0
1728 4 Original from partition p0
1729 DROP TABLE t1;
1730 SET SESSION debug_dbug=@save_dbug;
1731 SET SESSION debug_dbug="+d,crash_change_partition_7";
1732 CREATE TABLE t1 (a INT, b VARCHAR(64))
1733 ENGINE = 'InnoDB'
1734 PARTITION BY LIST (a)
1735 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1736 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1737 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1738 # State before crash
1739 db.opt
1740 t1#P#p0.ibd
1741 t1#P#p10.ibd
1742 t1.frm
1743 t1.par
1744 SHOW CREATE TABLE t1;
1745 Table Create Table
1746 t1 CREATE TABLE `t1` (
1747 `a` int(11) DEFAULT NULL,
1748 `b` varchar(64) DEFAULT NULL
1749 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1750 PARTITION BY LIST (`a`)
1751 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1752 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1753 SELECT * FROM t1;
1754 a b
1755 1 Original from partition p0
1756 11 Original from partition p1
1757 12 Original from partition p1
1758 13 Original from partition p1
1759 14 Original from partition p1
1760 2 Original from partition p0
1761 3 Original from partition p0
1762 4 Original from partition p0
1763 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
1764 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
1765 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
1766 ERROR HY000: Lost connection to server during query
1767 # State after crash (before recovery)
1768 #sql-shadow-t1.frm
1769 #sql-shadow-t1.par
1770 db.opt
1771 t1#P#p0.ibd
1772 t1#P#p10#TMP#.ibd
1773 t1#P#p10.ibd
1774 t1#P#p20#TMP#.ibd
1775 t1.frm
1776 t1.par
1777 # State after crash recovery
1778 db.opt
1779 t1#P#p0.ibd
1780 t1#P#p10.ibd
1781 t1#P#p20.ibd
1782 t1.frm
1783 t1.par
1784 SHOW CREATE TABLE t1;
1785 Table Create Table
1786 t1 CREATE TABLE `t1` (
1787 `a` int(11) DEFAULT NULL,
1788 `b` varchar(64) DEFAULT NULL
1789 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1790 PARTITION BY LIST (`a`)
1791 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1792 PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
1793 PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
1794 SELECT * FROM t1;
1795 a b
1796 1 Original from partition p0
1797 11 Original from partition p1
1798 12 Original from partition p1
1799 13 Original from partition p1
1800 14 Original from partition p1
1801 2 Original from partition p0
1802 3 Original from partition p0
1803 4 Original from partition p0
1804 DROP TABLE t1;
1805 SET SESSION debug_dbug=@save_dbug;
1806 SET SESSION debug_dbug="+d,crash_change_partition_8";
1807 CREATE TABLE t1 (a INT, b VARCHAR(64))
1808 ENGINE = 'InnoDB'
1809 PARTITION BY LIST (a)
1810 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1811 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1812 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1813 # State before crash
1814 db.opt
1815 t1#P#p0.ibd
1816 t1#P#p10.ibd
1817 t1.frm
1818 t1.par
1819 SHOW CREATE TABLE t1;
1820 Table Create Table
1821 t1 CREATE TABLE `t1` (
1822 `a` int(11) DEFAULT NULL,
1823 `b` varchar(64) DEFAULT NULL
1824 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1825 PARTITION BY LIST (`a`)
1826 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1827 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1828 SELECT * FROM t1;
1829 a b
1830 1 Original from partition p0
1831 11 Original from partition p1
1832 12 Original from partition p1
1833 13 Original from partition p1
1834 14 Original from partition p1
1835 2 Original from partition p0
1836 3 Original from partition p0
1837 4 Original from partition p0
1838 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
1839 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
1840 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
1841 ERROR HY000: Lost connection to server during query
1842 # State after crash (before recovery)
1843 #sql-shadow-t1.frm
1844 #sql-shadow-t1.par
1845 db.opt
1846 t1#P#p0.ibd
1847 t1#P#p10#TMP#.ibd
1848 t1#P#p10.ibd
1849 t1#P#p20#TMP#.ibd
1850 t1.frm
1851 t1.par
1852 # State after crash recovery
1853 db.opt
1854 t1#P#p0.ibd
1855 t1#P#p10.ibd
1856 t1#P#p20.ibd
1857 t1.frm
1858 t1.par
1859 SHOW CREATE TABLE t1;
1860 Table Create Table
1861 t1 CREATE TABLE `t1` (
1862 `a` int(11) DEFAULT NULL,
1863 `b` varchar(64) DEFAULT NULL
1864 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1865 PARTITION BY LIST (`a`)
1866 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1867 PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
1868 PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
1869 SELECT * FROM t1;
1870 a b
1871 1 Original from partition p0
1872 11 Original from partition p1
1873 12 Original from partition p1
1874 13 Original from partition p1
1875 14 Original from partition p1
1876 2 Original from partition p0
1877 3 Original from partition p0
1878 4 Original from partition p0
1879 DROP TABLE t1;
1880 SET SESSION debug_dbug=@save_dbug;
1881 SET SESSION debug_dbug="+d,crash_change_partition_9";
1882 CREATE TABLE t1 (a INT, b VARCHAR(64))
1883 ENGINE = 'InnoDB'
1884 PARTITION BY LIST (a)
1885 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1886 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1887 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1888 # State before crash
1889 db.opt
1890 t1#P#p0.ibd
1891 t1#P#p10.ibd
1892 t1.frm
1893 t1.par
1894 SHOW CREATE TABLE t1;
1895 Table Create Table
1896 t1 CREATE TABLE `t1` (
1897 `a` int(11) DEFAULT NULL,
1898 `b` varchar(64) DEFAULT NULL
1899 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1900 PARTITION BY LIST (`a`)
1901 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1902 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1903 SELECT * FROM t1;
1904 a b
1905 1 Original from partition p0
1906 11 Original from partition p1
1907 12 Original from partition p1
1908 13 Original from partition p1
1909 14 Original from partition p1
1910 2 Original from partition p0
1911 3 Original from partition p0
1912 4 Original from partition p0
1913 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
1914 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
1915 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
1916 ERROR HY000: Lost connection to server during query
1917 # State after crash (before recovery)
1918 db.opt
1919 t1#P#p0.ibd
1920 t1#P#p10#TMP#.ibd
1921 t1#P#p10.ibd
1922 t1#P#p20#TMP#.ibd
1923 t1.frm
1924 t1.par
1925 # State after crash recovery
1926 db.opt
1927 t1#P#p0.ibd
1928 t1#P#p10.ibd
1929 t1#P#p20.ibd
1930 t1.frm
1931 t1.par
1932 SHOW CREATE TABLE t1;
1933 Table Create Table
1934 t1 CREATE TABLE `t1` (
1935 `a` int(11) DEFAULT NULL,
1936 `b` varchar(64) DEFAULT NULL
1937 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1938 PARTITION BY LIST (`a`)
1939 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1940 PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
1941 PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
1942 SELECT * FROM t1;
1943 a b
1944 1 Original from partition p0
1945 11 Original from partition p1
1946 12 Original from partition p1
1947 13 Original from partition p1
1948 14 Original from partition p1
1949 2 Original from partition p0
1950 3 Original from partition p0
1951 4 Original from partition p0
1952 DROP TABLE t1;
1953 SET SESSION debug_dbug=@save_dbug;
1954 SET SESSION debug_dbug="+d,crash_change_partition_10";
1955 CREATE TABLE t1 (a INT, b VARCHAR(64))
1956 ENGINE = 'InnoDB'
1957 PARTITION BY LIST (a)
1958 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
1959 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
1960 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
1961 # State before crash
1962 db.opt
1963 t1#P#p0.ibd
1964 t1#P#p10.ibd
1965 t1.frm
1966 t1.par
1967 SHOW CREATE TABLE t1;
1968 Table Create Table
1969 t1 CREATE TABLE `t1` (
1970 `a` int(11) DEFAULT NULL,
1971 `b` varchar(64) DEFAULT NULL
1972 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
1973 PARTITION BY LIST (`a`)
1974 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
1975 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
1976 SELECT * FROM t1;
1977 a b
1978 1 Original from partition p0
1979 11 Original from partition p1
1980 12 Original from partition p1
1981 13 Original from partition p1
1982 14 Original from partition p1
1983 2 Original from partition p0
1984 3 Original from partition p0
1985 4 Original from partition p0
1986 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
1987 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
1988 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
1989 ERROR HY000: Lost connection to server during query
1990 # State after crash (before recovery)
1991 db.opt
1992 t1#P#p0.ibd
1993 t1#P#p10#TMP#.ibd
1994 t1#P#p10.ibd
1995 t1#P#p20#TMP#.ibd
1996 t1.frm
1997 t1.par
1998 # State after crash recovery
1999 db.opt
2000 t1#P#p0.ibd
2001 t1#P#p10.ibd
2002 t1#P#p20.ibd
2003 t1.frm
2004 t1.par
2005 SHOW CREATE TABLE t1;
2006 Table Create Table
2007 t1 CREATE TABLE `t1` (
2008 `a` int(11) DEFAULT NULL,
2009 `b` varchar(64) DEFAULT NULL
2010 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
2011 PARTITION BY LIST (`a`)
2012 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
2013 PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
2014 PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
2015 SELECT * FROM t1;
2016 a b
2017 1 Original from partition p0
2018 11 Original from partition p1
2019 12 Original from partition p1
2020 13 Original from partition p1
2021 14 Original from partition p1
2022 2 Original from partition p0
2023 3 Original from partition p0
2024 4 Original from partition p0
2025 DROP TABLE t1;
2026 SET SESSION debug_dbug=@save_dbug;
2027 SET SESSION debug_dbug="+d,crash_change_partition_11";
2028 CREATE TABLE t1 (a INT, b VARCHAR(64))
2029 ENGINE = 'InnoDB'
2030 PARTITION BY LIST (a)
2031 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
2032 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
2033 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
2034 # State before crash
2035 db.opt
2036 t1#P#p0.ibd
2037 t1#P#p10.ibd
2038 t1.frm
2039 t1.par
2040 SHOW CREATE TABLE t1;
2041 Table Create Table
2042 t1 CREATE TABLE `t1` (
2043 `a` int(11) DEFAULT NULL,
2044 `b` varchar(64) DEFAULT NULL
2045 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
2046 PARTITION BY LIST (`a`)
2047 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
2048 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
2049 SELECT * FROM t1;
2050 a b
2051 1 Original from partition p0
2052 11 Original from partition p1
2053 12 Original from partition p1
2054 13 Original from partition p1
2055 14 Original from partition p1
2056 2 Original from partition p0
2057 3 Original from partition p0
2058 4 Original from partition p0
2059 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
2060 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
2061 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
2062 ERROR HY000: Lost connection to server during query
2063 # State after crash (before recovery)
2064 db.opt
2065 t1#P#p0.ibd
2066 t1#P#p10.ibd
2067 t1#P#p20.ibd
2068 t1.frm
2069 t1.par
2070 # State after crash recovery
2071 db.opt
2072 t1#P#p0.ibd
2073 t1#P#p10.ibd
2074 t1#P#p20.ibd
2075 t1.frm
2076 t1.par
2077 SHOW CREATE TABLE t1;
2078 Table Create Table
2079 t1 CREATE TABLE `t1` (
2080 `a` int(11) DEFAULT NULL,
2081 `b` varchar(64) DEFAULT NULL
2082 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
2083 PARTITION BY LIST (`a`)
2084 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
2085 PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
2086 PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
2087 SELECT * FROM t1;
2088 a b
2089 1 Original from partition p0
2090 11 Original from partition p1
2091 12 Original from partition p1
2092 13 Original from partition p1
2093 14 Original from partition p1
2094 2 Original from partition p0
2095 3 Original from partition p0
2096 4 Original from partition p0
2097 DROP TABLE t1;
2098 SET SESSION debug_dbug=@save_dbug;
2099 SET SESSION debug_dbug="+d,crash_change_partition_12";
2100 CREATE TABLE t1 (a INT, b VARCHAR(64))
2101 ENGINE = 'InnoDB'
2102 PARTITION BY LIST (a)
2103 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
2104 PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
2105 INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
2106 # State before crash
2107 db.opt
2108 t1#P#p0.ibd
2109 t1#P#p10.ibd
2110 t1.frm
2111 t1.par
2112 SHOW CREATE TABLE t1;
2113 Table Create Table
2114 t1 CREATE TABLE `t1` (
2115 `a` int(11) DEFAULT NULL,
2116 `b` varchar(64) DEFAULT NULL
2117 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
2118 PARTITION BY LIST (`a`)
2119 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
2120 PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
2121 SELECT * FROM t1;
2122 a b
2123 1 Original from partition p0
2124 11 Original from partition p1
2125 12 Original from partition p1
2126 13 Original from partition p1
2127 14 Original from partition p1
2128 2 Original from partition p0
2129 3 Original from partition p0
2130 4 Original from partition p0
2131 ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
2132 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
2133 PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
2134 ERROR HY000: Lost connection to server during query
2135 # State after crash (before recovery)
2136 db.opt
2137 t1#P#p0.ibd
2138 t1#P#p10.ibd
2139 t1#P#p20.ibd
2140 t1.frm
2141 t1.par
2142 # State after crash recovery
2143 db.opt
2144 t1#P#p0.ibd
2145 t1#P#p10.ibd
2146 t1#P#p20.ibd
2147 t1.frm
2148 t1.par
2149 SHOW CREATE TABLE t1;
2150 Table Create Table
2151 t1 CREATE TABLE `t1` (
2152 `a` int(11) DEFAULT NULL,
2153 `b` varchar(64) DEFAULT NULL
2154 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
2155 PARTITION BY LIST (`a`)
2156 (PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
2157 PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
2158 PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
2159 SELECT * FROM t1;
2160 a b
2161 1 Original from partition p0
2162 11 Original from partition p1
2163 12 Original from partition p1
2164 13 Original from partition p1
2165 14 Original from partition p1
2166 2 Original from partition p0
2167 3 Original from partition p0
2168 4 Original from partition p0
2169 DROP TABLE t1;
2170 SET SESSION debug_dbug=@save_dbug;