From 8a79fa0e4d0385818da056f7a4a39fde95d62fe3 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Wed, 18 Sep 2019 13:22:08 +0530 Subject: MDEV-19529 InnoDB hang on DROP FULLTEXT INDEX Problem: ======= During dropping of fts index, InnoDB waits for fts_optimize_remove_table() and it holds dict_sys->mutex and dict_operaiton_lock even though the table id is not present in the queue. But fts_optimize_thread does wait for dict_sys->mutex to process the unrelated table id from the slot. Solution: ======== Whenever table is added to fts_optimize_wq, update the fts_status of in-memory fts subsystem to TABLE_IN_QUEUE. Whenever drop index wants to remove table from the queue, it can check the fts_status to decide whether it should send the MSG_DELETE_TABLE to the queue. Removed the following functions because these are all deadcode. dict_table_wait_for_bg_threads_to_exit(), fts_wait_for_background_thread_to_start(),fts_start_shutdown(), fts_shudown(). --- storage/innobase/fts/fts0config.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'storage/innobase/fts/fts0config.cc') diff --git a/storage/innobase/fts/fts0config.cc b/storage/innobase/fts/fts0config.cc index 940c944a436..b39d568575c 100644 --- a/storage/innobase/fts/fts0config.cc +++ b/storage/innobase/fts/fts0config.cc @@ -224,8 +224,7 @@ fts_config_set_value( pars_info_bind_varchar_literal(info, "value", value->f_str, value->f_len); - const bool dict_locked = fts_table->table->fts->fts_status - & TABLE_DICT_LOCKED; + const bool dict_locked = fts_table->table->fts->dict_locked; fts_table->suffix = "CONFIG"; fts_get_table_name(fts_table, table_name, dict_locked); -- cgit v1.2.1