bugfix: DEBUG_SYNC() invoked with no THD

While DEBUG_SYNC doesn't make sense without a valid THD, it might
be put in the code that's invoked both within and outside of a
THD context (e.g. in maria_open(), there is no THD during recovery).
This commit is contained in:
Sergei Golubchik 2017-02-18 15:06:25 +01:00
parent 8897b50dca
commit 924a81a548

View File

@ -1520,6 +1520,8 @@ static void debug_sync(THD *thd, const char *sync_point_name, size_t name_len)
{
if (!thd)
thd= current_thd;
if (!thd)
return;
st_debug_sync_control *ds_control= thd->debug_sync_control;
st_debug_sync_action *action;