1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
This commit is contained in:
Mikael Ronström
2011-05-19 10:49:43 +02:00
22 changed files with 1074 additions and 68 deletions

View File

@ -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.