diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2021-01-19 14:25:51 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2021-01-19 14:25:51 +0300 |
commit | 775aa6f08a33042c11039450006cd5a65554aa80 (patch) | |
tree | 90a8b51b129e222acdcddf0909d79e99e5f6b62d /mysql-test | |
parent | 82d39d4374c358c2378af05e42a2e679ffe91306 (diff) | |
download | mariadb-git-775aa6f08a33042c11039450006cd5a65554aa80.tar.gz |
MDEV-24403 Segfault on CREATE TABLE with explicit FTS_DOC_ID_INDEX by multiple fields
Ignore table->fts freed previously by create_table_info_t::create_table().
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/innodb_fts/r/create.result | 10 | ||||
-rw-r--r-- | mysql-test/suite/innodb_fts/t/create.test | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb_fts/r/create.result b/mysql-test/suite/innodb_fts/r/create.result index c3a14fa0281..963b31fdbd7 100644 --- a/mysql-test/suite/innodb_fts/r/create.result +++ b/mysql-test/suite/innodb_fts/r/create.result @@ -182,3 +182,13 @@ Table Op Msg_type Msg_text test.t1 optimize status OK DROP TABLE t1; SET GLOBAL innodb_optimize_fulltext_only= @optimize_fulltext.save; +# +# MDEV-24403 Segfault on CREATE TABLE with explicit FTS_DOC_ID_INDEX by multiple fields +# +create table t1 ( +f1 int, f2 text, +FTS_DOC_ID bigint unsigned not null, +unique key FTS_DOC_ID_INDEX(FTS_DOC_ID, f1), +fulltext (f2)) +engine=innodb; +ERROR 42000: Incorrect index name 'FTS_DOC_ID_INDEX' diff --git a/mysql-test/suite/innodb_fts/t/create.test b/mysql-test/suite/innodb_fts/t/create.test index 4e522994fcc..38c93de4982 100644 --- a/mysql-test/suite/innodb_fts/t/create.test +++ b/mysql-test/suite/innodb_fts/t/create.test @@ -106,3 +106,14 @@ SET GLOBAL innodb_optimize_fulltext_only= 1; OPTIMIZE TABLE t1; DROP TABLE t1; SET GLOBAL innodb_optimize_fulltext_only= @optimize_fulltext.save; + +--echo # +--echo # MDEV-24403 Segfault on CREATE TABLE with explicit FTS_DOC_ID_INDEX by multiple fields +--echo # +--error ER_WRONG_NAME_FOR_INDEX +create table t1 ( + f1 int, f2 text, + FTS_DOC_ID bigint unsigned not null, + unique key FTS_DOC_ID_INDEX(FTS_DOC_ID, f1), + fulltext (f2)) +engine=innodb; |