diff options
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 0805eda59e4..68d8ba4a189 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1166,6 +1166,19 @@ bool THD::store_globals() } +/** + Untie THD from current thread + + Used when using --thread-handling=pool-of-threads +*/ + +void THD::reset_globals() +{ + pthread_mutex_lock(&LOCK_thd_data); + mysys_var= 0; + pthread_mutex_unlock(&LOCK_thd_data); +} + /* Cleanup after query. |