Commit 77867c14 authored by Marko Mäkelä's avatar Marko Mäkelä

dict_create_index_tree_in_mem(): Remove dead code

In InnoDB, CREATE TEMPORARY TABLE does not allow FULLTEXT INDEX.
Replace a condition with a debug assertion, and add a test.
parent 8c4f3b31
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 ( CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200), title VARCHAR(200),
......
...@@ -3,6 +3,14 @@ ...@@ -3,6 +3,14 @@
-- source include/have_innodb.inc -- source include/have_innodb.inc
# Create FTS table # 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 ( CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200), title VARCHAR(200),
......
...@@ -943,14 +943,10 @@ dict_create_index_tree_in_mem( ...@@ -943,14 +943,10 @@ dict_create_index_tree_in_mem(
const trx_t* trx) /*!< in: InnoDB transaction handle */ const trx_t* trx) /*!< in: InnoDB transaction handle */
{ {
mtr_t mtr; mtr_t mtr;
ulint page_no = FIL_NULL; ulint page_no;
ut_ad(mutex_own(&dict_sys->mutex)); ut_ad(mutex_own(&dict_sys->mutex));
ut_ad(!(index->type & DICT_FTS));
if (index->type == DICT_FTS) {
/* FTS index does not need an index tree */
return(DB_SUCCESS);
}
mtr_start(&mtr); mtr_start(&mtr);
mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO); mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment