From 15a68fc255b3eb78a2678a2aee4123dea5911a54 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Wed, 20 Jul 2022 16:05:33 +0530 Subject: MDEV-29058 Assertion `index->type == 32' failed in dict_index_build_internal_fts - Import tablespace re-evicts and reload the table definition. During that time, innodb has to load the table even though the secondary fts index marked as corrupted --- mysql-test/suite/innodb_fts/r/fulltext.result | 14 ++++++++++++++ mysql-test/suite/innodb_fts/t/fulltext.test | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb_fts/r/fulltext.result b/mysql-test/suite/innodb_fts/r/fulltext.result index a6c88511670..085c8caf261 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext.result +++ b/mysql-test/suite/innodb_fts/r/fulltext.result @@ -760,4 +760,18 @@ Brien O 'Brien O' Brien DROP TABLE t1; +# +# MDEV-29058 Assertion `index->type == 32' failed +# in dict_index_build_internal_fts +# +call mtr.add_suppression("InnoDB: Index `f` of table `test`.`t2` is corrupted"); +call mtr.add_suppression("InnoDB: Skip adjustment of root pages for index `f`."); +CREATE TABLE t1 (f CHAR(8), FULLTEXT KEY (f)) ENGINE=InnoDB; +CREATE TABLE t2 LIKE t1; +ALTER TABLE t2 DISCARD TABLESPACE; +FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +ALTER TABLE t1 DISCARD TABLESPACE; +ALTER TABLE t2 IMPORT TABLESPACE; +DROP TABLE t2, t1; # End of 10.3 tests diff --git a/mysql-test/suite/innodb_fts/t/fulltext.test b/mysql-test/suite/innodb_fts/t/fulltext.test index f6c53abd525..2cf82d0fe90 100644 --- a/mysql-test/suite/innodb_fts/t/fulltext.test +++ b/mysql-test/suite/innodb_fts/t/fulltext.test @@ -770,4 +770,24 @@ SELECT * FROM t1 WHERE MATCH (f1) AGAINST ("+Doh'nuts" IN BOOLEAN MODE); SELECT * FROM t1 WHERE MATCH (f1) AGAINST ("+Ö''Brien" IN BOOLEAN MODE); DROP TABLE t1; +--echo # +--echo # MDEV-29058 Assertion `index->type == 32' failed +--echo # in dict_index_build_internal_fts +--echo # +call mtr.add_suppression("InnoDB: Index `f` of table `test`.`t2` is corrupted"); +call mtr.add_suppression("InnoDB: Skip adjustment of root pages for index `f`."); +let $MYSQLD_DATADIR = `SELECT @@datadir`; +CREATE TABLE t1 (f CHAR(8), FULLTEXT KEY (f)) ENGINE=InnoDB; +CREATE TABLE t2 LIKE t1; +ALTER TABLE t2 DISCARD TABLESPACE; +--disable_warnings +FLUSH TABLES t1 FOR EXPORT; +--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd +--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg +UNLOCK TABLES; +ALTER TABLE t1 DISCARD TABLESPACE; +ALTER TABLE t2 IMPORT TABLESPACE; +--enable_warnings +DROP TABLE t2, t1; + --echo # End of 10.3 tests -- cgit v1.2.1