1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

merge from 5.1 for bug#11764633

This commit is contained in:
Mayank Prasad
2011-05-18 19:47:29 +05:30
parent a48bff1d90
commit 359549beab
4 changed files with 54 additions and 2 deletions

View File

@ -1354,6 +1354,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.