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:
@ -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 (
|
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 @@
|
|||||||
-- 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(
|
|||||||
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);
|
||||||
|
Reference in New Issue
Block a user