summaryrefslogtreecommitdiff
path: root/sql/debug_sync.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/debug_sync.cc')
-rw-r--r--sql/debug_sync.cc20
1 files changed, 14 insertions, 6 deletions
diff --git a/sql/debug_sync.cc b/sql/debug_sync.cc
index fdca2c47dbc..2fc2e00d043 100644
--- a/sql/debug_sync.cc
+++ b/sql/debug_sync.cc
@@ -287,12 +287,6 @@ void debug_sync_end_thread(THD *thd)
{
st_debug_sync_control *ds_control= thd->debug_sync_control;
- /*
- This synchronization point can be used to synchronize on thread end.
- This is the latest point in a THD's life, where this can be done.
- */
- DEBUG_SYNC(thd, "thread_end");
-
if (ds_control->ds_action)
{
st_debug_sync_action *action= ds_control->ds_action;
@@ -322,6 +316,20 @@ void debug_sync_end_thread(THD *thd)
}
+void debug_sync_reset_thread(THD *thd)
+{
+ if (thd->debug_sync_control)
+ {
+ /*
+ This synchronization point can be used to synchronize on thread end.
+ This is the latest point in a THD's life, where this can be done.
+ */
+ DEBUG_SYNC(thd, "thread_end");
+ thd->debug_sync_control->ds_active= 0;
+ }
+}
+
+
/**
Move a string by length.