MDEV-21903 FTS optimize thread aborts during shutdown

- This issue was caused by 5e62b6a5e0.
fts_optimize_callback() should free fts_optimize_wq and make it as NULL
when it receives FTS_MSG_STOP message. So that subsequent
fts_optimize_callback() doesn't fail with segmentation fault.
This commit is contained in:
Thirunarayanan Balathandayuthapani 2020-03-12 23:24:47 +05:30
parent e74c1c9ece
commit c58686447f

View file

@ -2936,6 +2936,9 @@ static void fts_optimize_callback(void *)
ib_vector_free(fts_slots);
fts_slots = NULL;
ib_wqueue_free(fts_optimize_wq);
fts_optimize_wq = NULL;
innobase_destroy_background_thd(fts_opt_thd);
ib::info() << "FTS optimize thread exiting.";
@ -3023,8 +3026,6 @@ fts_optimize_shutdown()
os_event_wait(fts_opt_shutdown_event);
os_event_destroy(fts_opt_shutdown_event);
ib_wqueue_free(fts_optimize_wq);
fts_optimize_wq = NULL;
fts_opt_thd = NULL;
}