diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-09-30 18:02:29 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-09-30 18:02:29 +0530 |
commit | d6b33ea237c620923a7d4458a5907be0738c821d (patch) | |
tree | 0e8d99e67c5a21cc9416b68b151cf499ed067b99 /storage/innobase | |
parent | cd5f4d2a5939aa047734f023b28462c65f3e4569 (diff) | |
download | mariadb-git-d6b33ea237c620923a7d4458a5907be0738c821d.tar.gz |
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 a41d429765c7ddb528b9b438c68b25ff55d3bd55.
Fix should check for fts optimize thread shutdown state
before checking fts_optimize_wq.
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/fts/fts0opt.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc index 39720b07bd1..8ad1cf4ebe1 100644 --- a/storage/innobase/fts/fts0opt.cc +++ b/storage/innobase/fts/fts0opt.cc @@ -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. |