Debian Codegraph @

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

raw
1 call mtr.add_suppression("Index for table 'imp_t1' is corrupt; try to repair it");
2 SET @save_innodb_checksum_algorithm=@@GLOBAL.innodb_checksum_algorithm;
3 SET GLOBAL innodb_checksum_algorithm=full_crc32;
4 CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
5 CREATE TABLE imp_t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
6 ALTER TABLE imp_t1 DISCARD TABLESPACE ;
7 FLUSH TABLES t1 FOR EXPORT;
8 UNLOCK TABLES;
9 ALTER TABLE imp_t1 IMPORT TABLESPACE;
10 ERROR HY000: Schema mismatch (ROW_FORMAT mismatch)
11 CREATE TABLE imp_t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
12 ERROR 42S01: Table 'imp_t1' already exists
13 DROP TABLE imp_t1;
14 CREATE TABLE imp_t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
15 DROP TABLE imp_t1, t1;
16 SET GLOBAL innodb_checksum_algorithm=@save_innodb_checksum_algorithm;
17 #
18 # MDEV-33400 Adaptive hash index corruption after DISCARD TABLESPACE
19 #
20 SET @save_adaptive=@@GLOBAL.innodb_adaptive_hash_index;
21 SET GLOBAL innodb_adaptive_hash_index=ON;
22 CREATE TABLE t (a INT PRIMARY KEY) ENGINE=INNODB;
23 INSERT INTO t SELECT * FROM seq_1_to_131;
24 ALTER TABLE t ADD hid INT DEFAULT 2;
25 INSERT INTO t VALUES (251,1);
26 ALTER TABLE t DISCARD TABLESPACE;
27 CHECK TABLE mysql.innodb_table_stats;
28 Table Op Msg_type Msg_text
29 mysql.innodb_table_stats check status OK
30 DROP TABLE t;
31 SET GLOBAL innodb_adaptive_hash_index=@save_adaptive;
32 # End of 10.4 tests
33 #
34 # MDEV-18288: Transportable Tablespaces leave AUTO_INCREMENT in mismatched
35 # state, causing INSERT errors in newly imported tables when .cfg is not used.
36 #
37 CREATE TABLE t1(
38 id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
39 PRIMARY KEY (id)
40 ) ENGINE=INNODB;
41 CREATE TABLE t2 LIKE t1;
42 ALTER TABLE t2 DISCARD TABLESPACE;
43 INSERT INTO t1() VALUES();
44 INSERT INTO t1() VALUES();
45 FLUSH TABLES test.t1 FOR EXPORT;
46 # Copy data file
47 # Skip CFG file copy
48 UNLOCK TABLES;
49 DROP TABLE t1;
50 ALTER TABLE t2 IMPORT TABLESPACE;
51 Warnings:
52 Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
53 SELECT * FROM t2 ORDER BY id;
54 id
55 1
56 2
57 INSERT INTO t2() VALUES();
58 INSERT INTO t2() VALUES();
59 INSERT INTO t2() VALUES();
60 SELECT * FROM t2 ORDER BY id;
61 id
62 1
63 2
64 3
65 4
66 5
67 DROP TABLE t2;
68 #
69 # MDEV-34181 Instant table aborts after discard tablespace
70 #
71 CREATE TABLE t1(c3 INT, c2 INT, c1 INT KEY)ENGINE=InnoDB;
72 INSERT INTO t1 VALUES(1, 1, 1), (2, 2, 2);
73 CREATE TABLE t2 (c1 INT KEY) ENGINE=InnoDB;
74 INSERT INTO t2 VALUES(1);
75 ALTER TABLE t2 ADD c2 INT;
76 FLUSH TABLES t1 FOR EXPORT;
77 UNLOCK TABLES;
78 ALTER TABLE t2 DISCARD TABLESPACE;
79 ALTER TABLE t2 ADD c3 INT FIRST;
80 Warnings:
81 Warning 1814 Tablespace has been discarded for table `t2`
82 ALTER TABLE t2 IMPORT TABLESPACE;
83 Warnings:
84 Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
85 SHOW CREATE TABLE t2;
86 Table Create Table
87 t2 CREATE TABLE `t2` (
88 `c3` int(11) DEFAULT NULL,
89 `c1` int(11) NOT NULL,
90 `c2` int(11) DEFAULT NULL,
91 PRIMARY KEY (`c1`)
92 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
93 DROP TABLE t2, t1;
94 # End of 10.5 tests
95 #
96 # MDEV-27006 Assertion `!lock_trx_has_sys_table_locks(trx)'
97 # failed in dberr_t row_discard_tablespace_for_mysql
98 # (dict_table_t*, trx_t*)
99 CREATE TABLE t1 (c INT KEY) ENGINE=INNODB;
100 CREATE TABLE t2 (c INT KEY,FOREIGN KEY(c) REFERENCES t1 (c)) ENGINE=INNODB;
101 ALTER TABLE t1 DISCARD TABLESPACE;
102 ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
103 DROP TABLE t2, t1;
104 # End of 10.6 tests