1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-22811 DDL fails to drop and re-create FTS index

Problem:
========
- InnoDB clears the fts resource when last FTS index is being dropped
if the table has user defined FTS_DOC_ID. While creating the new fts
index, InnoDB expects to have FTS resources.

Fix:
===
fts_drop_index(): Removed the fts resource clear.

fts_clear_all(): Clear the fts resource when there are no new fts
index to be added.

commit_cache_norebuild(), row_merge_drop_indexes():
Tries to call fts resource after removing associated fts index
from table object
This commit is contained in:
Thirunarayanan Balathandayuthapani
2020-06-12 09:38:35 +05:30
parent b46b7144d1
commit e30c4cfc7a
6 changed files with 51 additions and 24 deletions

View File

@@ -270,3 +270,11 @@ SELECT * FROM articles WHERE MATCH (title, body)
AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
DROP TABLE articles;
--echo #
--echo # MDEV-22811 DDL fails to drop and re-create FTS index
--echo #
CREATE TABLE t1 (FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY,
f1 VARCHAR(200),FULLTEXT fidx(f1))engine=innodb;
ALTER TABLE t1 DROP index fidx, ADD FULLTEXT INDEX(f1);
DROP TABLE t1;