diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-03-10 16:46:42 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-03-10 16:50:10 +0530 |
commit | cc9c303a450bf9cbb9bda51638d0c435fe755336 (patch) | |
tree | e898183482ad0e21a9e2dd61d2ab6f7aa32bbf1e /mysql-test | |
parent | 75f781f0d27d73dce4c7570e5b94b9482903c907 (diff) | |
download | mariadb-git-cc9c303a450bf9cbb9bda51638d0c435fe755336.tar.gz |
MDEV-25070 SIGSEGV in fts_create_in_mem_aux_table
InnoDB set the space in dict_table_t as NULL when table
is discarded. So InnoDB shouldn't use the space present
in table to detect whether the given tablespace is
temporary tablespace.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/innodb_fts/r/fulltext.result | 16 | ||||
-rw-r--r-- | mysql-test/suite/innodb_fts/t/fulltext.test | 9 |
2 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb_fts/r/fulltext.result b/mysql-test/suite/innodb_fts/r/fulltext.result index 0e30dd0be05..f41b938604d 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext.result +++ b/mysql-test/suite/innodb_fts/r/fulltext.result @@ -689,3 +689,19 @@ FTS_DOC_ID t 2 foo bar 3 foo DROP TABLE t; +# +# MDEV-25070 SIGSEGV in fts_create_in_mem_aux_table +# +CREATE TABLE t1 (a CHAR, FULLTEXT KEY(a)) ENGINE=InnoDB; +ALTER TABLE t1 DISCARD TABLESPACE; +ALTER TABLE t1 ADD FULLTEXT INDEX (a); +Warnings: +Warning 1814 Tablespace has been discarded for table `t1` +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` char(1) DEFAULT NULL, + FULLTEXT KEY `a` (`a`), + FULLTEXT KEY `a_2` (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/t/fulltext.test b/mysql-test/suite/innodb_fts/t/fulltext.test index 663b202265b..560ee8f96f2 100644 --- a/mysql-test/suite/innodb_fts/t/fulltext.test +++ b/mysql-test/suite/innodb_fts/t/fulltext.test @@ -717,3 +717,12 @@ while ($N) } DROP TABLE t; + +--echo # +--echo # MDEV-25070 SIGSEGV in fts_create_in_mem_aux_table +--echo # +CREATE TABLE t1 (a CHAR, FULLTEXT KEY(a)) ENGINE=InnoDB; +ALTER TABLE t1 DISCARD TABLESPACE; +ALTER TABLE t1 ADD FULLTEXT INDEX (a); +SHOW CREATE TABLE t1; +DROP TABLE t1; |