1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-18152 Assertion 'num_fts_index <= 1' failed

InnoDB does not allow creating multiple FULLTEXT INDEX
in ALGORITHM=INPLACE. This constraint was not being properly
enforced after MariaDB started to support ALGORITHM=INSTANT
and instant ADD COLUMN.

As a side effect of this bug, we again allow ALGORITHM=INPLACE
to rebuild a table when one FULLTEXT INDEX survives.
Also, we are returning a more accurate reason for refusing LOCK=NONE.

innobase_fulltext_exist(): Return the number of fulltext indexes.

ha_innobase::check_if_supported_inplace_alter(): If the table
needs to be rebuilt, refuse the operation if multiple fulltext
indexes would remain.
This commit is contained in:
Marko Mäkelä
2019-01-18 12:39:19 +02:00
parent a0d3ead83a
commit 4e75bfcb21
7 changed files with 68 additions and 57 deletions

View File

@ -650,7 +650,7 @@ SET DEBUG_SYNC= 'alter_table_copy_after_lock_upgrade SIGNAL upgraded';
--echo #Setup a table with FULLTEXT index.
--connection default
CREATE TABLE t1(fld1 CHAR(10), FULLTEXT(fld1)) ENGINE= INNODB;
CREATE TABLE t1(fld1 CHAR(10), FULLTEXT(fld1), FULLTEXT(fld1)) ENGINE= INNODB;
INSERT INTO t1 VALUES("String1");
--echo #OPTIMIZE TABLE operation.