summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb_fts/t/misc_debug.test
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-01-28 18:00:19 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-01-28 18:21:00 +0530
commita134ec37364bf7f006a73cf8eda212cec6a4f2cc (patch)
tree47aa2e9951615dee136a9de2ae7f693f7bbf6ff5 /mysql-test/suite/innodb_fts/t/misc_debug.test
parentafc16a6faac8c60622ec389dc38b7a223f53a726 (diff)
downloadmariadb-git-a134ec37364bf7f006a73cf8eda212cec6a4f2cc.tar.gz
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.
Diffstat (limited to 'mysql-test/suite/innodb_fts/t/misc_debug.test')
-rw-r--r--mysql-test/suite/innodb_fts/t/misc_debug.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb_fts/t/misc_debug.test b/mysql-test/suite/innodb_fts/t/misc_debug.test
index 4b32afb848c..aaf628abe6d 100644
--- a/mysql-test/suite/innodb_fts/t/misc_debug.test
+++ b/mysql-test/suite/innodb_fts/t/misc_debug.test
@@ -39,3 +39,16 @@ ALTER TABLE t ADD FULLTEXT INDEX (b(64));
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t;
+
+# MDEV-21550 Assertion `!table->fts->in_queue' failed in
+# fts_optimize_remove_table
+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;
+--error ER_ROW_IS_REFERENCED_2
+DROP TABLE t1;
+SET DEBUG_DBUG="+d,fts_instrument_sync";
+INSERT INTO t1 VALUES(1, "mariadb");
+ALTER TABLE t1 FORCE;
+# Cleanup
+DROP TABLE t2, t1;