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

MDEV-21550 Assertion `!table->fts->in_queue' failed in fts_optimize_remove_table

Problem:
=======
  The problem is that InnoDB doesn't add the table in fts slots if drop table fails. InnoDB marks the table is in fts slots while processing sync message. So the consecutive alter statement assumes that table is in queue and tries to remove it. But InnoDB can't find the table in fts_slots.

Solution:
=========
  i)  Removal of in_queue in fts_t while processing the fts sync message.
  ii) Add the table to fts_slots when drop table fails.
This commit is contained in:
Thirunarayanan Balathandayuthapani
2020-01-28 18:00:19 +05:30
parent afc16a6faa
commit a134ec3736
4 changed files with 27 additions and 2 deletions

View File

@ -17,3 +17,12 @@ ALTER TABLE t ADD FULLTEXT INDEX (b(64));
ERROR HY000: Unknown error
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t;
CREATE TABLE t1 (pk INT, a VARCHAR(8), PRIMARY KEY(pk),
FULLTEXT KEY(a)) ENGINE=InnoDB;
CREATE TABLE t2 (b INT, FOREIGN KEY(b) REFERENCES t1(pk)) ENGINE=InnoDB;
DROP TABLE t1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
SET DEBUG_DBUG="+d,fts_instrument_sync";
INSERT INTO t1 VALUES(1, "mariadb");
ALTER TABLE t1 FORCE;
DROP TABLE t2, t1;