1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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.
This commit is contained in:
Marko Mäkelä
2018-05-12 10:28:54 +03:00
parent 8c4f3b316e
commit 77867c147b
3 changed files with 17 additions and 6 deletions

View File

@ -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),

View File

@ -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),

View File

@ -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);