diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-05-12 10:28:54 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-05-12 10:28:54 +0300 |
commit | 77867c147b8a278977203ad33d7daff0587a112a (patch) | |
tree | d378d5b0f25fe73ed29dca2088cc78280d881336 | |
parent | 8c4f3b316e57e5a411247adba74bb333958ce573 (diff) | |
download | mariadb-git-bb_georg_10.2.tar.gz |
dict_create_index_tree_in_mem(): Remove dead codebb_georg_10.2
In InnoDB, CREATE TEMPORARY TABLE does not allow FULLTEXT INDEX.
Replace a condition with a debug assertion, and add a test.
-rw-r--r-- | mysql-test/suite/innodb_fts/r/basic.result | 7 | ||||
-rw-r--r-- | mysql-test/suite/innodb_fts/t/basic.test | 8 | ||||
-rw-r--r-- | storage/innobase/dict/dict0crea.cc | 8 |
3 files changed, 17 insertions, 6 deletions
diff --git a/mysql-test/suite/innodb_fts/r/basic.result b/mysql-test/suite/innodb_fts/r/basic.result index ae23b93dc84..d96127fbc34 100644 --- a/mysql-test/suite/innodb_fts/r/basic.result +++ b/mysql-test/suite/innodb_fts/r/basic.result @@ -1,3 +1,10 @@ +CREATE TEMPORARY TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200), +body TEXT, +FULLTEXT (title,body) +) ENGINE=InnoDB; +ERROR HY000: Cannot create FULLTEXT index on temporary InnoDB table CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), diff --git a/mysql-test/suite/innodb_fts/t/basic.test b/mysql-test/suite/innodb_fts/t/basic.test index 58f36be08a5..0c0920c5f16 100644 --- a/mysql-test/suite/innodb_fts/t/basic.test +++ b/mysql-test/suite/innodb_fts/t/basic.test @@ -3,6 +3,14 @@ -- source include/have_innodb.inc # Create FTS table +--error ER_INNODB_NO_FT_TEMP_TABLE +CREATE TEMPORARY TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200), + body TEXT, + FULLTEXT (title,body) + ) ENGINE=InnoDB; + CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc index c1ee4f3bc4e..a83ee896972 100644 --- a/storage/innobase/dict/dict0crea.cc +++ b/storage/innobase/dict/dict0crea.cc @@ -943,14 +943,10 @@ dict_create_index_tree_in_mem( const trx_t* trx) /*!< in: InnoDB transaction handle */ { mtr_t mtr; - ulint page_no = FIL_NULL; + ulint page_no; ut_ad(mutex_own(&dict_sys->mutex)); - - if (index->type == DICT_FTS) { - /* FTS index does not need an index tree */ - return(DB_SUCCESS); - } + ut_ad(!(index->type & DICT_FTS)); mtr_start(&mtr); mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO); |