Debian Codegraph @

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

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