Browse Source

MDEV-22787 fts_optimize_shutdown() deletes timer prematurely

fts_optimize_shutdown(): Wait for fts_optimize_callback()
to terminate before deleting the timer that it uses.
pull/1583/head
Marko Mäkelä 6 years ago
parent
commit
5b18ade0df
  1. 4
      storage/innobase/fts/fts0opt.cc

4
storage/innobase/fts/fts0opt.cc

@ -3014,8 +3014,6 @@ fts_optimize_shutdown()
/* We tell the OPTIMIZE thread to switch to state done, we /* We tell the OPTIMIZE thread to switch to state done, we
can't delete the work queue here because the add thread needs can't delete the work queue here because the add thread needs
deregister the FTS tables. */ deregister the FTS tables. */
delete timer;
timer = NULL;
task_group.cancel_pending(&task); task_group.cancel_pending(&task);
msg = fts_optimize_create_msg(FTS_MSG_STOP, NULL); msg = fts_optimize_create_msg(FTS_MSG_STOP, NULL);
@ -3026,6 +3024,8 @@ fts_optimize_shutdown()
os_event_destroy(fts_opt_shutdown_event); os_event_destroy(fts_opt_shutdown_event);
fts_opt_thd = NULL; fts_opt_thd = NULL;
delete timer;
timer = NULL;
} }
/** Sync the table during commit phase /** Sync the table during commit phase

Loading…
Cancel
Save