Debian Codegraph @

mysql-test/suite/innodb/t/import_hidden_fts.test

raw
1 --source include/have_innodb.inc
2 --source include/have_sequence.inc
3
4 --error 0,ER_UNKNOWN_SYSTEM_VARIABLE
5 SET @save_adaptive=@@GLOBAL.innodb_adaptive_hash_index;
6 --error 0,ER_UNKNOWN_SYSTEM_VARIABLE
7 SET GLOBAL innodb_adaptive_hash_index=ON;
8
9 # Table with virtual, fulltext, instant add, instant drop column
10 # and purgeable rows
11 call mtr.add_suppression("InnoDB: Added system generated FTS_DOC_ID and FTS_DOC_ID_INDEX while importing the tablespace");
12 CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
13 f2 CHAR(2) not null, fulltext f_idx(f2),
14 f3 INT as (f1) VIRTUAL, INDEX(f3),
15 f4 INT as (f1) STORED, INDEX(f4),
16 f5 INT as (f1) VIRTUAL)ENGINE=InnoDB;
17 INSERT INTO t1(f1, f2) VALUES(1, "on");
18 INSERT INTO t1(f1, f2) SELECT seq, "si" FROM seq_2_to_256;
19 ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL;
20 ALTER TABLE t1 DROP COLUMN f6;
21 ALTER TABLE t1 DROP INDEX f_idx;
22 connect(block_purge,localhost,root,,);
23 START TRANSACTION WITH CONSISTENT SNAPSHOT;
24
25 connection default;
26 DELETE FROM t1 WHERE f1 > 1;
27 FLUSH TABLE t1 FOR EXPORT;
28 let MYSQLD_DATADIR =`SELECT @@datadir`;
29 perl;
30 do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
31 ib_backup_tablespaces("test", "t1");
32 EOF
33 UNLOCK TABLES;
34 DROP TABLE t1;
35 disconnect block_purge;
36
37 CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
38 f2 CHAR(2) not null,
39 f3 INT as (f1) VIRTUAL, INDEX(f3),
40 f4 INT as (f1) STORED, INDEX(f4),
41 f5 INT as (f1) VIRTUAL)ENGINE=InnoDB;
42 ALTER TABLE t1 DISCARD TABLESPACE;
43 perl;
44 do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
45 ib_discard_tablespaces("test", "t1");
46 ib_restore_tablespaces("test", "t1");
47 EOF
48
49 --disable_warnings
50 ALTER TABLE t1 IMPORT TABLESPACE;
51 --enable_warnings
52 SHOW CREATE TABLE t1;
53 DROP TABLE t1;
54 --error 0,ER_UNKNOWN_SYSTEM_VARIABLE
55 SET GLOBAL innodb_adaptive_hash_index=@save_adaptive;