| 1 |
CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY, |
| 2 |
f2 CHAR(2) NOT NULL, FULLTEXT f_idx(f2), |
| 3 |
f3 INT as (f1) VIRTUAL, INDEX(f3))ENGINE=InnoDB; |
| 4 |
INSERT INTO t1(f1, f2) VALUES(1, "on"); |
| 5 |
ALTER TABLE t1 DROP INDEX f_idx; |
| 6 |
FLUSH TABLE t1 FOR EXPORT; |
| 7 |
Warnings: |
| 8 |
Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.' |
| 9 |
Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.' |
| 10 |
backup: t1 |
| 11 |
UNLOCK TABLES; |
| 12 |
Warnings: |
| 13 |
Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.' |
| 14 |
DROP TABLE t1; |
| 15 |
CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY, |
| 16 |
f2 CHAR(2) NOT NULL, |
| 17 |
f3 CHAR(2) NOT NULL, |
| 18 |
f4 INT AS (f1) VIRTUAL, INDEX(f4))ENGINE=InnoDB; |
| 19 |
ALTER TABLE t1 DISCARD TABLESPACE; |
| 20 |
restore: t1 .ibd and .cfg files |
| 21 |
ALTER TABLE t1 IMPORT TABLESPACE; |
| 22 |
ERROR HY000: Schema mismatch (Number of indexes don't match, table has 2 indexes but the tablespace meta-data file has 3 indexes) |
| 23 |
DROP TABLE t1; |
| 24 |
CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY, |
| 25 |
f2 CHAR(2) NOT NULL, |
| 26 |
f3 INT as (f1) VIRTUAL, INDEX(f3))ENGINE=InnoDB; |
| 27 |
ALTER TABLE t1 DISCARD TABLESPACE; |
| 28 |
restore: t1 .ibd and .cfg files |
| 29 |
SET @save_debug=@@debug_dbug; |
| 30 |
SET DEBUG_DBUG="+d,ib_import_set_index_root_failure"; |
| 31 |
ALTER TABLE t1 IMPORT TABLESPACE; |
| 32 |
ERROR HY000: Too many active concurrent transactions |
| 33 |
set DEBUG_DBUG=@save_dbug; |
| 34 |
SET @save_debug=@@debug_dbug; |
| 35 |
SET DEBUG_DBUG="+d,ib_import_vcol_update_fail"; |
| 36 |
ALTER TABLE t1 IMPORT TABLESPACE; |
| 37 |
ERROR 23000: Can't write; duplicate key in table 't1' |
| 38 |
set DEBUG_DBUG=@save_dbug; |
| 39 |
restore: t1 .ibd and .cfg files |
| 40 |
SET @save_dbug=@@debug_dbug; |
| 41 |
SET DEBUG_DBUG="+d,ib_import_fts_error"; |
| 42 |
ALTER TABLE t1 IMPORT TABLESPACE; |
| 43 |
ERROR 23000: Can't write; duplicate key in table 't1' |
| 44 |
SET DEBUG_DBUG=@save_dbug; |
| 45 |
unlink: t1.ibd |
| 46 |
unlink: t1.cfg |
| 47 |
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS |
| 48 |
WHERE table_id IN (SELECT table_id FROM information_schema.innodb_sys_tables where name="test/t1"); |
| 49 |
NAME |
| 50 |
f1 |
| 51 |
f2 |
| 52 |
f3 |
| 53 |
SHOW CREATE TABLE t1; |
| 54 |
Table Create Table |
| 55 |
t1 CREATE TABLE `t1` ( |
| 56 |
`f1` int(11) NOT NULL, |
| 57 |
`f2` char(2) NOT NULL, |
| 58 |
`f3` int(11) GENERATED ALWAYS AS (`f1`) VIRTUAL, |
| 59 |
PRIMARY KEY (`f1`), |
| 60 |
KEY `f3` (`f3`) |
| 61 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci |
| 62 |
DROP TABLE t1; |
| 63 |
CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY, |
| 64 |
FTS_DOC_ID BIGINT SIGNED NOT NULL, |
| 65 |
f2 CHAR(2) NOT NULL, |
| 66 |
FULLTEXT f_idx(f2))ENGINE=InnoDB; |
| 67 |
INSERT INTO t1 VALUES(1, 1, "on"); |
| 68 |
ALTER TABLE t1 DROP INDEX f_idx; |
| 69 |
FLUSH TABLE t1 FOR EXPORT; |
| 70 |
backup: t1 |
| 71 |
UNLOCK TABLES; |
| 72 |
DROP TABLE t1; |
| 73 |
CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY, |
| 74 |
f2 CHAR(2) NOT NULL)ENGINE=InnoDB; |
| 75 |
ALTER TABLE t1 DISCARD TABLESPACE; |
| 76 |
restore: t1 .ibd and .cfg files |
| 77 |
ALTER TABLE t1 IMPORT TABLESPACE; |
| 78 |
ERROR HY000: Schema mismatch (Column f2 ordinal value mismatch, it's at 1 in the table and 2 in the tablespace meta-data file) |
| 79 |
DROP TABLE t1; |