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

MDEV-35183 ADD FULLTEXT INDEX unnecessarily DROPS FTS COMMON TABLES

- InnoDB fulltext rebuilds the FTS COMMON table while adding the
new fulltext index. This can be optimized by avoiding rebuilding
the FTS COMMON table in case of FTS COMMON TABLE already exists.

Reviewed-by: Marko Mäkelä <marko.makela@mariadb.com>
This commit is contained in:
Thirunarayanan Balathandayuthapani
2024-10-21 10:31:24 +05:30
parent e14d2b7974
commit 7f7d78bc18
3 changed files with 52 additions and 2 deletions

View File

@@ -803,3 +803,19 @@ SELECT f1, MATCH(f1) AGAINST ("test" IN BOOLEAN MODE) FROM t1;
DROP TABLE t1;
--echo # End of 10.3 tests
--echo #
--echo # MDEV-35183 ADD FULLTEXT INDEX unnecessarily DROPS FTS
--echo # COMMON TABLES
--echo #
CREATE TABLE t1 (
ID INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200), book VARCHAR(200),
FULLTEXT fidx(title)) ENGINE = InnoDB;
INSERT INTO t1(title) VALUES('database');
ALTER TABLE t1 DROP INDEX fidx;
select space into @common_space from information_schema.innodb_sys_tables where name like "test/FTS_%_CONFIG";
ALTER TABLE t1 ADD FULLTEXT fidx_1(book);
select space=@common_space from information_schema.innodb_sys_tables where name like "test/FTS_%_CONFIG";
SHOW CREATE TABLE t1;
DROP TABLE t1;