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 abaa2b8c202..0e837d382b0 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1202,6 +1202,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. |