Debian Codegraph @

mysql-test/suite/innodb/r/innodb-wl5522.result

raw
1 call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT\\.");
2 call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it");
3 call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing");
4 FLUSH TABLES;
5 CREATE TABLE t1
6 (a INT AUTO_INCREMENT PRIMARY KEY,
7 b char(22),
8 c varchar(255),
9 KEY (b))
10 ENGINE = InnoDB;
11 CREATE TEMPORARY TABLE t (b char(22),c varchar(255));
12 INSERT INTO t VALUES
13 ('Apa', 'Filler........'),
14 ('Banan', 'Filler........'), ('Cavalry', '..asdasdfaeraf'),
15 ('Devotion', 'asdfuihknaskdf'), ('Evolution', 'lsjndofiabsoibeg');
16 INSERT INTO t1 (b,c) SELECT b,c FROM t,seq_1_to_128;
17 DROP TEMPORARY TABLE t;
18 SELECT COUNT(*) FROM t1;
19 COUNT(*)
20 640
21 SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
22 a b c
23 636 Apa Filler........
24 631 Apa Filler........
25 626 Apa Filler........
26 SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
27 a b c
28 640 Evolution lsjndofiabsoibeg
29 639 Devotion asdfuihknaskdf
30 638 Cavalry ..asdasdfaeraf
31 CREATE TABLE t2(a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPACT;
32 db.opt
33 t1.frm
34 t1.ibd
35 t2.frm
36 t2.ibd
37 # restart
38 FLUSH TABLE t1, t2 FOR EXPORT;
39 # List before copying files
40 db.opt
41 t1.cfg
42 t1.frm
43 t1.ibd
44 t2.cfg
45 t2.frm
46 t2.ibd
47 UNLOCK TABLES;
48 INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
49 SELECT COUNT(*) FROM t1;
50 COUNT(*)
51 1280
52 SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
53 a b c
54 1276 Apa Filler........
55 1271 Apa Filler........
56 1266 Apa Filler........
57 SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
58 a b c
59 1280 Evolution lsjndofiabsoibeg
60 1279 Devotion asdfuihknaskdf
61 1278 Cavalry ..asdasdfaeraf
62 # Restarting server
63 # restart
64 # Done restarting server
65 # List before t1 DISCARD
66 db.opt
67 t1.cfg.sav
68 t1.frm
69 t1.ibd
70 t1.ibd.sav
71 t2.cfg.sav
72 t2.frm
73 t2.ibd
74 t2.ibd.sav
75 ALTER TABLE t1 DISCARD TABLESPACE;
76 # List after t1 DISCARD
77 db.opt
78 t1.cfg.sav
79 t1.frm
80 t1.ibd.sav
81 t2.cfg.sav
82 t2.frm
83 t2.ibd
84 t2.ibd.sav
85 ALTER TABLE t1 IMPORT TABLESPACE;
86 ALTER TABLE t1 ENGINE InnoDB;
87 SELECT COUNT(*) FROM t1;
88 COUNT(*)
89 640
90 SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
91 a b c
92 636 Apa Filler........
93 631 Apa Filler........
94 626 Apa Filler........
95 SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
96 a b c
97 640 Evolution lsjndofiabsoibeg
98 639 Devotion asdfuihknaskdf
99 638 Cavalry ..asdasdfaeraf
100 db.opt
101 t1.cfg
102 t1.cfg.sav
103 t1.frm
104 t1.ibd
105 t1.ibd.sav
106 t2.cfg.sav
107 t2.frm
108 t2.ibd
109 t2.ibd.sav
110 SELECT COUNT(*) FROM t1;
111 COUNT(*)
112 640
113 SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
114 a b c
115 636 Apa Filler........
116 631 Apa Filler........
117 626 Apa Filler........
118 SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
119 a b c
120 640 Evolution lsjndofiabsoibeg
121 639 Devotion asdfuihknaskdf
122 638 Cavalry ..asdasdfaeraf
123 DROP TABLE t1;
124 ALTER TABLE t2 ROW_FORMAT=DYNAMIC;
125 ALTER TABLE t2 DISCARD TABLESPACE;
126 # List after t2 DISCARD
127 db.opt
128 t2.cfg.sav
129 t2.frm
130 t2.ibd.sav
131 ALTER TABLE t2 IMPORT TABLESPACE;
132 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT)
133 ALTER TABLE t2 IMPORT TABLESPACE;
134 Warnings:
135 Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
136 DROP TABLE t2;
137 SELECT @@innodb_file_per_table;
138 @@innodb_file_per_table
139 1
140 CREATE TABLE t1(
141 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
142 c2 INT) ENGINE=InnoDB;
143 INSERT INTO t1(c2) VALUES(1);
144 ALTER TABLE t1 IMPORT TABLESPACE;
145 ERROR HY000: Tablespace for table 'test/t1' exists. Please DISCARD the tablespace before IMPORT
146 SELECT * FROM t1;
147 c1 c2
148 1 1
149 DROP TABLE t1;
150 CREATE TABLE t1(
151 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
152 c2 INT) ENGINE=InnoDB;
153 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
154 db.opt
155 t1.frm
156 t1.ibd
157 FLUSH TABLES t1 FOR EXPORT;
158 backup: t1
159 db.opt
160 t1.cfg
161 t1.frm
162 t1.ibd
163 UNLOCK TABLES;
164 DROP TABLE t1;
165 CREATE TABLE t1(
166 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
167 c2 INT) ENGINE=InnoDB;
168 ALTER TABLE t1 DISCARD TABLESPACE;
169 SELECT * FROM t1;
170 ERROR HY000: Tablespace has been discarded for table `t1`
171 restore: t1 .ibd and .cfg files
172 db.opt
173 t1.cfg
174 t1.frm
175 t1.ibd
176 ALTER TABLE t1 IMPORT TABLESPACE;
177 CHECK TABLE t1;
178 Table Op Msg_type Msg_text
179 test.t1 check status OK
180 SELECT COUNT(*) FROM t1;
181 COUNT(*)
182 16
183 DROP TABLE t1;
184 CREATE TABLE t1(
185 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
186 c2 INT) ENGINE=InnoDB;
187 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
188 db.opt
189 t1.frm
190 t1.ibd
191 FLUSH TABLES t1 FOR EXPORT;
192 backup: t1
193 db.opt
194 t1.cfg
195 t1.frm
196 t1.ibd
197 UNLOCK TABLES;
198 db.opt
199 t1.frm
200 t1.ibd
201 DROP TABLE t1;
202 CREATE TABLE t1(
203 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
204 c2 INT) ENGINE=InnoDB;
205 ALTER TABLE t1 DISCARD TABLESPACE;
206 SELECT * FROM t1;
207 ERROR HY000: Tablespace has been discarded for table `t1`
208 restore: t1 .ibd and .cfg files
209 db.opt
210 t1.cfg
211 t1.frm
212 t1.ibd
213 ALTER TABLE t1 IMPORT TABLESPACE;
214 CHECK TABLE t1;
215 Table Op Msg_type Msg_text
216 test.t1 check status OK
217 SELECT COUNT(*) FROM t1;
218 COUNT(*)
219 16
220 DROP TABLE t1;
221 CREATE TABLE t1(
222 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
223 c2 INT, INDEX(c2)) ENGINE=InnoDB;
224 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
225 FLUSH TABLES t1 FOR EXPORT;
226 backup: t1
227 db.opt
228 t1.cfg
229 t1.frm
230 t1.ibd
231 UNLOCK TABLES;
232 DROP TABLE t1;
233 CREATE TABLE t1(
234 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
235 c2 INT, INDEX(c2)) ENGINE=InnoDB;
236 ALTER TABLE t1 DISCARD TABLESPACE;
237 SELECT * FROM t1;
238 ERROR HY000: Tablespace has been discarded for table `t1`
239 restore: t1 .ibd and .cfg files
240 ALTER TABLE t1 IMPORT TABLESPACE;
241 CHECK TABLE t1;
242 Table Op Msg_type Msg_text
243 test.t1 check status OK
244 SELECT COUNT(*) FROM t1 WHERE c2 = 1;
245 COUNT(*)
246 16
247 DROP TABLE t1;
248 CREATE TABLE t1(
249 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
250 c2 INT, INDEX idx(c2)) ENGINE=InnoDB;
251 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
252 FLUSH TABLES t1 FOR EXPORT;
253 backup: t1
254 UNLOCK TABLES;
255 DROP TABLE t1;
256 CREATE TABLE t1(
257 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
258 c2 INT, INDEX x(c2)) ENGINE=InnoDB;
259 ALTER TABLE t1 DISCARD TABLESPACE;
260 SELECT * FROM t1;
261 ERROR HY000: Tablespace has been discarded for table `t1`
262 restore: t1 .ibd and .cfg files
263 ALTER TABLE t1 IMPORT TABLESPACE;
264 ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.)
265 select count(*) from t1;
266 ERROR HY000: Tablespace has been discarded for table `t1`
267 ALTER TABLE t1 DROP INDEX x;
268 Warnings:
269 Warning 1814 Tablespace has been discarded for table `t1`
270 ALTER TABLE t1 DROP INDEX x, ALGORITHM=copy;
271 ERROR 42000: Can't DROP INDEX `x`; check that it exists
272 ALTER TABLE t1 ADD INDEX idx(c2);
273 Warnings:
274 Warning 1814 Tablespace has been discarded for table `t1`
275 restore: t1 .ibd and .cfg files
276 ALTER TABLE t1 IMPORT TABLESPACE;
277 CHECK TABLE t1;
278 Table Op Msg_type Msg_text
279 test.t1 check status OK
280 SELECT * FROM t1;
281 c1 c2
282 1 1
283 2 1
284 3 1
285 4 1
286 5 1
287 6 1
288 7 1
289 8 1
290 9 1
291 10 1
292 11 1
293 12 1
294 13 1
295 14 1
296 15 1
297 16 1
298 unlink: t1.cfg
299 DROP TABLE t1;
300 SET GLOBAL innodb_file_per_table = 0;
301 Warnings:
302 Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
303 CREATE TABLE t1(
304 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
305 c2 INT) ENGINE=InnoDB;
306 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
307 SHOW CREATE TABLE t1;
308 Table Create Table
309 t1 CREATE TABLE `t1` (
310 `c1` int(11) NOT NULL AUTO_INCREMENT,
311 `c2` int(11) DEFAULT NULL,
312 PRIMARY KEY (`c1`)
313 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
314 FLUSH TABLES t1 FOR EXPORT;
315 Warnings:
316 Warning 1809 Table `test`.`t1` in system tablespace
317 UNLOCK TABLES;
318 DROP TABLE t1;
319 SET GLOBAL innodb_file_per_table = 1;
320 Warnings:
321 Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
322 CREATE TABLE t1(
323 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
324 c2 INT, INDEX idx(c2)) ENGINE=InnoDB;
325 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
326 SHOW CREATE TABLE t1;
327 Table Create Table
328 t1 CREATE TABLE `t1` (
329 `c1` int(11) NOT NULL AUTO_INCREMENT,
330 `c2` int(11) DEFAULT NULL,
331 PRIMARY KEY (`c1`),
332 KEY `idx` (`c2`)
333 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
334 FLUSH TABLES t1 FOR EXPORT;
335 backup: t1
336 UNLOCK TABLES;
337 DROP TABLE t1;
338 CREATE TABLE t1(
339 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
340 c2 INT) ENGINE=InnoDB;
341 ALTER TABLE t1 DISCARD TABLESPACE;
342 SELECT * FROM t1;
343 ERROR HY000: Tablespace has been discarded for table `t1`
344 restore: t1 .ibd and .cfg files
345 ALTER TABLE t1 IMPORT TABLESPACE;
346 ERROR HY000: Schema mismatch (Number of indexes don't match, table has 1 indexes but the tablespace meta-data file has 2 indexes)
347 unlink: t1.ibd
348 unlink: t1.cfg
349 DROP TABLE t1;
350 CREATE TABLE t1(
351 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
352 c2 INT,
353 c3 INT, INDEX idx(c2)) ENGINE=InnoDB;
354 ALTER TABLE t1 DISCARD TABLESPACE;
355 SELECT * FROM t1;
356 ERROR HY000: Tablespace has been discarded for table `t1`
357 restore: t1 .ibd and .cfg files
358 ALTER TABLE t1 IMPORT TABLESPACE;
359 ERROR HY000: Schema mismatch (Column c3 not found in tablespace.)
360 unlink: t1.ibd
361 unlink: t1.cfg
362 DROP TABLE t1;
363 CREATE TABLE t1(
364 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
365 c2 BIGINT, INDEX idx(c2)) ENGINE=InnoDB;
366 ALTER TABLE t1 DISCARD TABLESPACE;
367 SELECT * FROM t1;
368 ERROR HY000: Tablespace has been discarded for table `t1`
369 restore: t1 .ibd and .cfg files
370 ALTER TABLE t1 IMPORT TABLESPACE;
371 ERROR HY000: Schema mismatch (Column c2 precise type mismatch, it's 0X408 in the table and 0X403 in the tablespace meta file)
372 unlink: t1.ibd
373 unlink: t1.cfg
374 DROP TABLE t1;
375 CREATE TABLE t1(
376 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
377 c2 INT, INDEX idx(c2)) ENGINE=InnoDB;
378 ALTER TABLE t1 DISCARD TABLESPACE;
379 SELECT * FROM t1;
380 ERROR HY000: Tablespace has been discarded for table `t1`
381 restore: t1 .ibd and .cfg files
382 ALTER TABLE t1 IMPORT TABLESPACE;
383 CHECK TABLE t1;
384 Table Op Msg_type Msg_text
385 test.t1 check status OK
386 unlink: t1.cfg
387 SHOW CREATE TABLE t1;
388 Table Create Table
389 t1 CREATE TABLE `t1` (
390 `c1` int(11) NOT NULL AUTO_INCREMENT,
391 `c2` int(11) DEFAULT NULL,
392 PRIMARY KEY (`c1`),
393 KEY `idx` (`c2`)
394 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
395 SELECT * FROM t1;
396 c1 c2
397 1 1
398 2 1
399 3 1
400 4 1
401 5 1
402 6 1
403 7 1
404 8 1
405 9 1
406 10 1
407 11 1
408 12 1
409 13 1
410 14 1
411 15 1
412 16 1
413 DROP TABLE t1;
414 CREATE TABLE t1(
415 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
416 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
417 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
418 SHOW CREATE TABLE t1;
419 Table Create Table
420 t1 CREATE TABLE `t1` (
421 `c1` int(11) NOT NULL AUTO_INCREMENT,
422 `c2` int(11) DEFAULT NULL,
423 PRIMARY KEY (`c1`),
424 KEY `idx` (`c2`)
425 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=REDUNDANT
426 FLUSH TABLES t1 FOR EXPORT;
427 backup: t1
428 UNLOCK TABLES;
429 DROP TABLE t1;
430 CREATE TABLE t1(
431 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
432 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
433 ALTER TABLE t1 DISCARD TABLESPACE;
434 SELECT * FROM t1;
435 ERROR HY000: Tablespace has been discarded for table `t1`
436 restore: t1 .ibd and .cfg files
437 ALTER TABLE t1 IMPORT TABLESPACE;
438 CHECK TABLE t1;
439 Table Op Msg_type Msg_text
440 test.t1 check status OK
441 unlink: t1.cfg
442 SHOW CREATE TABLE t1;
443 Table Create Table
444 t1 CREATE TABLE `t1` (
445 `c1` int(11) NOT NULL AUTO_INCREMENT,
446 `c2` int(11) DEFAULT NULL,
447 PRIMARY KEY (`c1`),
448 KEY `idx` (`c2`)
449 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=REDUNDANT
450 SELECT * FROM t1;
451 c1 c2
452 1 1
453 2 1
454 3 1
455 4 1
456 5 1
457 6 1
458 7 1
459 8 1
460 9 1
461 10 1
462 11 1
463 12 1
464 13 1
465 14 1
466 15 1
467 16 1
468 DROP TABLE t1;
469 CREATE TABLE t1(
470 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
471 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
472 ALTER TABLE t1 DISCARD TABLESPACE;
473 SELECT * FROM t1;
474 ERROR HY000: Tablespace has been discarded for table `t1`
475 restore: t1 .ibd and .cfg files
476 ALTER TABLE t1 IMPORT TABLESPACE;
477 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x1 and the meta-data file has 0x0; .cfg file uses ROW_FORMAT=REDUNDANT)
478 unlink: t1.ibd
479 unlink: t1.cfg
480 DROP TABLE t1;
481 CREATE TABLE t1(
482 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
483 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
484 ALTER TABLE t1 DISCARD TABLESPACE;
485 SELECT * FROM t1;
486 ERROR HY000: Tablespace has been discarded for table `t1`
487 restore: t1 .ibd and .cfg files
488 ALTER TABLE t1 IMPORT TABLESPACE;
489 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x0; .cfg file uses ROW_FORMAT=REDUNDANT)
490 unlink: t1.ibd
491 unlink: t1.cfg
492 DROP TABLE t1;
493 CREATE TABLE t1(
494 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
495 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
496 ALTER TABLE t1 DISCARD TABLESPACE;
497 SELECT * FROM t1;
498 ERROR HY000: Tablespace has been discarded for table `t1`
499 restore: t1 .ibd and .cfg files
500 ALTER TABLE t1 IMPORT TABLESPACE;
501 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x29 and the meta-data file has 0x0; .cfg file uses ROW_FORMAT=REDUNDANT)
502 unlink: t1.ibd
503 unlink: t1.cfg
504 DROP TABLE t1;
505 CREATE TABLE t1(
506 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
507 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
508 ALTER TABLE t1 DISCARD TABLESPACE;
509 SELECT * FROM t1;
510 ERROR HY000: Tablespace has been discarded for table `t1`
511 restore: t1 .ibd and .cfg files
512 ALTER TABLE t1 IMPORT TABLESPACE;
513 unlink: t1.cfg
514 SHOW CREATE TABLE t1;
515 Table Create Table
516 t1 CREATE TABLE `t1` (
517 `c1` int(11) NOT NULL AUTO_INCREMENT,
518 `c2` int(11) DEFAULT NULL,
519 PRIMARY KEY (`c1`),
520 KEY `idx` (`c2`)
521 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=REDUNDANT
522 SELECT * FROM t1;
523 c1 c2
524 1 1
525 2 1
526 3 1
527 4 1
528 5 1
529 6 1
530 7 1
531 8 1
532 9 1
533 10 1
534 11 1
535 12 1
536 13 1
537 14 1
538 15 1
539 16 1
540 DROP TABLE t1;
541 CREATE TABLE t1(
542 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
543 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
544 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
545 SHOW CREATE TABLE t1;
546 Table Create Table
547 t1 CREATE TABLE `t1` (
548 `c1` int(11) NOT NULL AUTO_INCREMENT,
549 `c2` int(11) DEFAULT NULL,
550 PRIMARY KEY (`c1`),
551 KEY `idx` (`c2`)
552 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=COMPACT
553 FLUSH TABLES t1 FOR EXPORT;
554 backup: t1
555 UNLOCK TABLES;
556 DROP TABLE t1;
557 CREATE TABLE t1(
558 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
559 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
560 ALTER TABLE t1 DISCARD TABLESPACE;
561 SELECT * FROM t1;
562 ERROR HY000: Tablespace has been discarded for table `t1`
563 restore: t1 .ibd and .cfg files
564 ALTER TABLE t1 IMPORT TABLESPACE;
565 CHECK TABLE t1;
566 Table Op Msg_type Msg_text
567 test.t1 check status OK
568 unlink: t1.cfg
569 SHOW CREATE TABLE t1;
570 Table Create Table
571 t1 CREATE TABLE `t1` (
572 `c1` int(11) NOT NULL AUTO_INCREMENT,
573 `c2` int(11) DEFAULT NULL,
574 PRIMARY KEY (`c1`),
575 KEY `idx` (`c2`)
576 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=COMPACT
577 SELECT * FROM t1;
578 c1 c2
579 1 1
580 2 1
581 3 1
582 4 1
583 5 1
584 6 1
585 7 1
586 8 1
587 9 1
588 10 1
589 11 1
590 12 1
591 13 1
592 14 1
593 15 1
594 16 1
595 DROP TABLE t1;
596 CREATE TABLE t1(
597 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
598 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
599 ALTER TABLE t1 DISCARD TABLESPACE;
600 SELECT * FROM t1;
601 ERROR HY000: Tablespace has been discarded for table `t1`
602 restore: t1 .ibd and .cfg files
603 ALTER TABLE t1 IMPORT TABLESPACE;
604 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x0 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT)
605 unlink: t1.ibd
606 unlink: t1.cfg
607 DROP TABLE t1;
608 CREATE TABLE t1(
609 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
610 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
611 ALTER TABLE t1 DISCARD TABLESPACE;
612 SELECT * FROM t1;
613 ERROR HY000: Tablespace has been discarded for table `t1`
614 restore: t1 .ibd and .cfg files
615 ALTER TABLE t1 IMPORT TABLESPACE;
616 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT)
617 unlink: t1.ibd
618 unlink: t1.cfg
619 DROP TABLE t1;
620 CREATE TABLE t1(
621 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
622 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
623 ALTER TABLE t1 DISCARD TABLESPACE;
624 SELECT * FROM t1;
625 ERROR HY000: Tablespace has been discarded for table `t1`
626 restore: t1 .ibd and .cfg files
627 ALTER TABLE t1 IMPORT TABLESPACE;
628 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x29 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT)
629 unlink: t1.ibd
630 unlink: t1.cfg
631 DROP TABLE t1;
632 CREATE TABLE t1(
633 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
634 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
635 ALTER TABLE t1 DISCARD TABLESPACE;
636 SELECT * FROM t1;
637 ERROR HY000: Tablespace has been discarded for table `t1`
638 restore: t1 .ibd and .cfg files
639 ALTER TABLE t1 IMPORT TABLESPACE;
640 CHECK TABLE t1;
641 Table Op Msg_type Msg_text
642 test.t1 check status OK
643 unlink: t1.cfg
644 SHOW CREATE TABLE t1;
645 Table Create Table
646 t1 CREATE TABLE `t1` (
647 `c1` int(11) NOT NULL AUTO_INCREMENT,
648 `c2` int(11) DEFAULT NULL,
649 PRIMARY KEY (`c1`),
650 KEY `idx` (`c2`)
651 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=COMPACT
652 SELECT * FROM t1;
653 c1 c2
654 1 1
655 2 1
656 3 1
657 4 1
658 5 1
659 6 1
660 7 1
661 8 1
662 9 1
663 10 1
664 11 1
665 12 1
666 13 1
667 14 1
668 15 1
669 16 1
670 DROP TABLE t1;
671 CREATE TABLE t1(
672 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
673 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
674 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
675 SHOW CREATE TABLE t1;
676 Table Create Table
677 t1 CREATE TABLE `t1` (
678 `c1` int(11) NOT NULL AUTO_INCREMENT,
679 `c2` int(11) DEFAULT NULL,
680 PRIMARY KEY (`c1`),
681 KEY `idx` (`c2`)
682 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC
683 FLUSH TABLES t1 FOR EXPORT;
684 backup: t1
685 UNLOCK TABLES;
686 DROP TABLE t1;
687 CREATE TABLE t1(
688 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
689 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
690 ALTER TABLE t1 DISCARD TABLESPACE;
691 SELECT * FROM t1;
692 ERROR HY000: Tablespace has been discarded for table `t1`
693 restore: t1 .ibd and .cfg files
694 ALTER TABLE t1 IMPORT TABLESPACE;
695 CHECK TABLE t1;
696 Table Op Msg_type Msg_text
697 test.t1 check status OK
698 unlink: t1.cfg
699 SHOW CREATE TABLE t1;
700 Table Create Table
701 t1 CREATE TABLE `t1` (
702 `c1` int(11) NOT NULL AUTO_INCREMENT,
703 `c2` int(11) DEFAULT NULL,
704 PRIMARY KEY (`c1`),
705 KEY `idx` (`c2`)
706 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC
707 SELECT * FROM t1;
708 c1 c2
709 1 1
710 2 1
711 3 1
712 4 1
713 5 1
714 6 1
715 7 1
716 8 1
717 9 1
718 10 1
719 11 1
720 12 1
721 13 1
722 14 1
723 15 1
724 16 1
725 DROP TABLE t1;
726 CREATE TABLE t1(
727 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
728 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
729 ALTER TABLE t1 DISCARD TABLESPACE;
730 SELECT * FROM t1;
731 ERROR HY000: Tablespace has been discarded for table `t1`
732 restore: t1 .ibd and .cfg files
733 ALTER TABLE t1 IMPORT TABLESPACE;
734 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x1 and the meta-data file has 0x21; .cfg file uses ROW_FORMAT=DYNAMIC)
735 unlink: t1.ibd
736 unlink: t1.cfg
737 DROP TABLE t1;
738 CREATE TABLE t1(
739 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
740 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
741 ALTER TABLE t1 DISCARD TABLESPACE;
742 SELECT * FROM t1;
743 ERROR HY000: Tablespace has been discarded for table `t1`
744 restore: t1 .ibd and .cfg files
745 ALTER TABLE t1 IMPORT TABLESPACE;
746 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x0 and the meta-data file has 0x21; .cfg file uses ROW_FORMAT=DYNAMIC)
747 unlink: t1.ibd
748 unlink: t1.cfg
749 DROP TABLE t1;
750 CREATE TABLE t1(
751 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
752 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
753 ALTER TABLE t1 DISCARD TABLESPACE;
754 SELECT * FROM t1;
755 ERROR HY000: Tablespace has been discarded for table `t1`
756 restore: t1 .ibd and .cfg files
757 ALTER TABLE t1 IMPORT TABLESPACE;
758 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x29 and the meta-data file has 0x21; .cfg file uses ROW_FORMAT=DYNAMIC)
759 unlink: t1.ibd
760 unlink: t1.cfg
761 DROP TABLE t1;
762 CREATE TABLE t1(
763 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
764 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
765 ALTER TABLE t1 DISCARD TABLESPACE;
766 SELECT * FROM t1;
767 ERROR HY000: Tablespace has been discarded for table `t1`
768 restore: t1 .ibd and .cfg files
769 ALTER TABLE t1 IMPORT TABLESPACE;
770 CHECK TABLE t1;
771 Table Op Msg_type Msg_text
772 test.t1 check status OK
773 unlink: t1.cfg
774 SHOW CREATE TABLE t1;
775 Table Create Table
776 t1 CREATE TABLE `t1` (
777 `c1` int(11) NOT NULL AUTO_INCREMENT,
778 `c2` int(11) DEFAULT NULL,
779 PRIMARY KEY (`c1`),
780 KEY `idx` (`c2`)
781 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC
782 SELECT * FROM t1;
783 c1 c2
784 1 1
785 2 1
786 3 1
787 4 1
788 5 1
789 6 1
790 7 1
791 8 1
792 9 1
793 10 1
794 11 1
795 12 1
796 13 1
797 14 1
798 15 1
799 16 1
800 DROP TABLE t1;
801 CREATE TABLE t1(
802 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
803 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
804 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
805 SHOW CREATE TABLE t1;
806 Table Create Table
807 t1 CREATE TABLE `t1` (
808 `c1` int(11) NOT NULL AUTO_INCREMENT,
809 `c2` int(11) DEFAULT NULL,
810 PRIMARY KEY (`c1`),
811 KEY `idx` (`c2`)
812 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=COMPRESSED
813 FLUSH TABLES t1 FOR EXPORT;
814 backup: t1
815 UNLOCK TABLES;
816 DROP TABLE t1;
817 CREATE TABLE t1(
818 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
819 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
820 ALTER TABLE t1 DISCARD TABLESPACE;
821 SELECT * FROM t1;
822 ERROR HY000: Tablespace has been discarded for table `t1`
823 restore: t1 .ibd and .cfg files
824 ALTER TABLE t1 IMPORT TABLESPACE;
825 CHECK TABLE t1;
826 Table Op Msg_type Msg_text
827 test.t1 check status OK
828 unlink: t1.cfg
829 SHOW CREATE TABLE t1;
830 Table Create Table
831 t1 CREATE TABLE `t1` (
832 `c1` int(11) NOT NULL AUTO_INCREMENT,
833 `c2` int(11) DEFAULT NULL,
834 PRIMARY KEY (`c1`),
835 KEY `idx` (`c2`)
836 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=COMPRESSED
837 SELECT * FROM t1;
838 c1 c2
839 1 1
840 2 1
841 3 1
842 4 1
843 5 1
844 6 1
845 7 1
846 8 1
847 9 1
848 10 1
849 11 1
850 12 1
851 13 1
852 14 1
853 15 1
854 16 1
855 DROP TABLE t1;
856 CREATE TABLE t1(
857 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
858 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
859 ALTER TABLE t1 DISCARD TABLESPACE;
860 SELECT * FROM t1;
861 ERROR HY000: Tablespace has been discarded for table `t1`
862 restore: t1 .ibd and .cfg files
863 ALTER TABLE t1 IMPORT TABLESPACE;
864 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x0 and the meta-data file has 0x29; .cfg file uses ROW_FORMAT=COMPRESSED)
865 unlink: t1.ibd
866 unlink: t1.cfg
867 DROP TABLE t1;
868 CREATE TABLE t1(
869 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
870 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
871 ALTER TABLE t1 DISCARD TABLESPACE;
872 SELECT * FROM t1;
873 ERROR HY000: Tablespace has been discarded for table `t1`
874 restore: t1 .ibd and .cfg files
875 ALTER TABLE t1 IMPORT TABLESPACE;
876 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x1 and the meta-data file has 0x29; .cfg file uses ROW_FORMAT=COMPRESSED)
877 unlink: t1.ibd
878 unlink: t1.cfg
879 DROP TABLE t1;
880 CREATE TABLE t1(
881 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
882 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
883 ALTER TABLE t1 DISCARD TABLESPACE;
884 SELECT * FROM t1;
885 ERROR HY000: Tablespace has been discarded for table `t1`
886 restore: t1 .ibd and .cfg files
887 ALTER TABLE t1 IMPORT TABLESPACE;
888 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x29; .cfg file uses ROW_FORMAT=COMPRESSED)
889 unlink: t1.ibd
890 unlink: t1.cfg
891 DROP TABLE t1;
892 CREATE TABLE t1(
893 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
894 c2 INT, INDEX idx(c2)) ENGINE=InnoDB
895 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
896 ALTER TABLE t1 DISCARD TABLESPACE;
897 SELECT * FROM t1;
898 ERROR HY000: Tablespace has been discarded for table `t1`
899 restore: t1 .ibd and .cfg files
900 ALTER TABLE t1 IMPORT TABLESPACE;
901 ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x23 and the meta-data file has 0x29; .cfg file uses ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8)
902 unlink: t1.ibd
903 unlink: t1.cfg
904 DROP TABLE t1;
905 CREATE TABLE t1(
906 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
907 c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
908 ALTER TABLE t1 DISCARD TABLESPACE;
909 SELECT * FROM t1;
910 ERROR HY000: Tablespace has been discarded for table `t1`
911 restore: t1 .ibd and .cfg files
912 ALTER TABLE t1 IMPORT TABLESPACE;
913 CHECK TABLE t1;
914 Table Op Msg_type Msg_text
915 test.t1 check status OK
916 unlink: t1.cfg
917 SHOW CREATE TABLE t1;
918 Table Create Table
919 t1 CREATE TABLE `t1` (
920 `c1` int(11) NOT NULL AUTO_INCREMENT,
921 `c2` int(11) DEFAULT NULL,
922 PRIMARY KEY (`c1`),
923 KEY `idx` (`c2`)
924 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=COMPRESSED
925 SELECT * FROM t1;
926 c1 c2
927 1 1
928 2 1
929 3 1
930 4 1
931 5 1
932 6 1
933 7 1
934 8 1
935 9 1
936 10 1
937 11 1
938 12 1
939 13 1
940 14 1
941 15 1
942 16 1
943 DROP TABLE t1;
944 CREATE TABLE t1 ( id INT NOT NULL, i1 INT, i2 INT, i3 INT, PRIMARY KEY (id)) engine=innodb;
945 CREATE TABLE t2 ( id INT NOT NULL, i1 INT, i2 INT, PRIMARY KEY (id)) engine=innodb;
946 ALTER TABLE t2 DISCARD TABLESPACE;
947 FLUSH TABLES t1 FOR EXPORT;
948 UNLOCK TABLES;
949 ALTER TABLE t2 IMPORT TABLESPACE;
950 ERROR HY000: Schema mismatch (Column DB_ROW_ID ordinal value mismatch, it's at 3 in the table and 4 in the tablespace meta-data file)
951 DROP TABLE t1, t2;
952 CREATE TABLE t1 ( id INT NOT NULL, i1 INT, i2 INT, PRIMARY KEY (id)) engine=innodb;
953 CREATE TABLE t2 ( id INT NOT NULL, i1 INT, i2 INT, i3 INT, PRIMARY KEY (id)) engine=innodb;
954 ALTER TABLE t2 DISCARD TABLESPACE;
955 FLUSH TABLES t1 FOR EXPORT;
956 UNLOCK TABLES;
957 ALTER TABLE t2 IMPORT TABLESPACE;
958 ERROR HY000: Schema mismatch (Column i3 not found in tablespace.)
959 DROP TABLE t1, t2;
960 call mtr.add_suppression("Got error -1 when reading table '.*'");
961 call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'");
962 call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");