Skip to content

Commit 924a81a

Browse files
committed
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).
1 parent 8897b50 commit 924a81a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/debug_sync.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,8 @@ static void debug_sync(THD *thd, const char *sync_point_name, size_t name_len)
15201520
{
15211521
if (!thd)
15221522
thd= current_thd;
1523+
if (!thd)
1524+
return;
15231525

15241526
st_debug_sync_control *ds_control= thd->debug_sync_control;
15251527
st_debug_sync_action *action;

0 commit comments

Comments
 (0)