File: import_hidden_fts.test

package info (click to toggle)
mariadb 1%3A11.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 765,428 kB
  • sloc: ansic: 2,382,827; cpp: 1,803,532; asm: 378,315; perl: 63,176; sh: 46,496; pascal: 40,776; java: 39,363; yacc: 20,428; python: 19,506; sql: 17,864; xml: 12,463; ruby: 8,544; makefile: 6,059; cs: 5,855; ada: 1,700; lex: 1,193; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (55 lines) | stat: -rw-r--r-- 1,760 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--source include/have_innodb.inc
--source include/have_sequence.inc

--error 0,ER_UNKNOWN_SYSTEM_VARIABLE
SET @save_adaptive=@@GLOBAL.innodb_adaptive_hash_index;
--error 0,ER_UNKNOWN_SYSTEM_VARIABLE
SET GLOBAL innodb_adaptive_hash_index=ON;

# Table with virtual, fulltext, instant add, instant drop column
# and purgeable rows
call mtr.add_suppression("InnoDB: Added system generated FTS_DOC_ID and FTS_DOC_ID_INDEX while importing the tablespace");
CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
		f2 CHAR(2) not null, fulltext f_idx(f2),
		f3 INT as (f1) VIRTUAL, INDEX(f3),
		f4 INT as (f1) STORED, INDEX(f4),
		f5 INT as (f1) VIRTUAL)ENGINE=InnoDB;
INSERT INTO t1(f1, f2) VALUES(1, "on");
INSERT INTO t1(f1, f2) SELECT seq, "si" FROM seq_2_to_256;
ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL;
ALTER TABLE t1 DROP COLUMN f6;
ALTER TABLE t1 DROP INDEX f_idx;
connect(block_purge,localhost,root,,);
START TRANSACTION WITH CONSISTENT SNAPSHOT;

connection default;
DELETE FROM t1 WHERE f1 > 1;
FLUSH TABLE t1 FOR EXPORT;
let MYSQLD_DATADIR =`SELECT @@datadir`;
perl;
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_backup_tablespaces("test", "t1");
EOF
UNLOCK TABLES;
DROP TABLE t1;
disconnect block_purge;

CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
		f2 CHAR(2) not null,
		f3 INT as (f1) VIRTUAL, INDEX(f3),
		f4 INT as (f1) STORED, INDEX(f4),
		f5 INT as (f1) VIRTUAL)ENGINE=InnoDB;
ALTER TABLE t1 DISCARD TABLESPACE;
perl;
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_discard_tablespaces("test", "t1");
ib_restore_tablespaces("test", "t1");
EOF

--disable_warnings
ALTER TABLE t1 IMPORT TABLESPACE;
--enable_warnings
SHOW CREATE TABLE t1;
DROP TABLE t1;
--error 0,ER_UNKNOWN_SYSTEM_VARIABLE
SET GLOBAL innodb_adaptive_hash_index=@save_adaptive;