Skip to content
Permalink
Browse files
MDEV-29058 Assertion `index->type == 32' failed in dict_index_build_i…
…nternal_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
  • Loading branch information
Thirunarayanan committed Jul 26, 2022
1 parent f076dc2 commit 15a68fc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
@@ -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
@@ -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
@@ -2720,7 +2720,7 @@ dict_index_build_internal_fts(
{
dict_index_t* new_index;

ut_ad(index->type == DICT_FTS);
ut_ad(index->type & DICT_FTS);
ut_ad(mutex_own(&dict_sys->mutex));

/* Create a new index */

0 comments on commit 15a68fc

Please sign in to comment.