diff options
author | Mikael Ronström <mikael@dator9> | 2011-05-19 10:49:43 +0200 |
---|---|---|
committer | Mikael Ronström <mikael@dator9> | 2011-05-19 10:49:43 +0200 |
commit | 84af79729a44d1ff9cff43082e04dd6f7c514aba (patch) | |
tree | 96b106b875a33beafadd90ada5a0d593ef5f0f2e /sql/sql_class.cc | |
parent | 54574a52bd2aba4bbe514911119a76bef972df4c (diff) | |
parent | 359549beabcdafaa847dc41ef2566d414331f79d (diff) | |
download | mariadb-git-84af79729a44d1ff9cff43082e04dd6f7c514aba.tar.gz |
merge
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 2646cc82717..9636dc50ee4 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1600,6 +1600,25 @@ bool THD::store_globals() return 0; } +/* + Remove the thread specific info (THD and mem_root pointer) stored during + store_global call for this thread. +*/ +bool THD::restore_globals() +{ + /* + Assert that thread_stack is initialized: it's necessary to be able + to track stack overrun. + */ + DBUG_ASSERT(thread_stack); + + /* Undocking the thread specific data. */ + my_pthread_setspecific_ptr(THR_THD, NULL); + my_pthread_setspecific_ptr(THR_MALLOC, NULL); + + return 0; +} + /* Cleanup after query. |