mariadb/mysql-test/suite/innodb/t/innodb_defragment_small.test
Marko Mäkelä 25d69ea012 MDEV-12198 innodb_defragment=1 crashes server on OPTIMIZE TABLE when FULLTEXT index exists
ha_innobase::defragment_table(): Skip corrupted indexes and
FULLTEXT INDEX. In InnoDB, FULLTEXT INDEX is implemented with
auxiliary tables. We will not defragment them on OPTIMIZE TABLE.
2017-04-06 08:56:25 +03:00

28 lines
788 B
Text

--source include/have_innodb.inc
SET @innodb_defragment_orig=@@GLOBAL.innodb_defragment;
SET GLOBAL innodb_defragment = 1;
# Small tests copied from innodb.innodb_defragment
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(256), KEY(a, b)) ENGINE=INNODB;
OPTIMIZE TABLE t1;
INSERT INTO t1 VALUES (100000, REPEAT('A', 256));
INSERT INTO t1 VALUES (200000, REPEAT('A', 256));
INSERT INTO t1 VALUES (300000, REPEAT('A', 256));
INSERT INTO t1 VALUES (400000, REPEAT('A', 256));
OPTIMIZE TABLE t1;
DROP TABLE t1;
--echo #
--echo # MDEV-12198 innodb_defragment=1 crashes server on
--echo # OPTIMIZE TABLE when FULLTEXT index exists
--echo #
CREATE TABLE t1 (c TEXT, FULLTEXT KEY (c)) ENGINE=InnoDB;
OPTIMIZE TABLE t1;
DROP TABLE t1;
SET GLOBAL innodb_defragment = @innodb_defragment_orig;