MDEV-23856 fts_optimize_wq accessed after shutdown of FTS Optimize thread

In fts_optimize_remove_table(), InnoDB tries to access the
fts_optimize_wq after shutting down the fts optimize thread.
This issue caused by the commit a41d4297.
Fix should check for fts optimize thread shutdown state
before checking fts_optimize_wq.
parent cd5f4d2a
......@@ -2603,9 +2603,13 @@ fts_optimize_remove_table(
os_event_destroy(event);
ut_d(mutex_enter(&fts_optimize_wq->mutex));
ut_ad(!table->fts->in_queue);
ut_d(mutex_exit(&fts_optimize_wq->mutex));
#ifdef UNIV_DEBUG
if (!fts_opt_start_shutdown) {
mutex_enter(&fts_optimize_wq->mutex);
ut_ad(!table->fts->in_queue);
mutex_exit(&fts_optimize_wq->mutex);
}
#endif /* UNIV_DEBUG */
}
/** Send sync fts cache for the table.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment