From b1d951d4626cb70375c262de9ba4a67a24d85e57 Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Wed, 23 Nov 2005 21:18:10 +0300 Subject: Always initialize THD::thread_stack: it's used in check_stack_overrun(). --- sql/sql_class.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sql/sql_class.cc') diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 82af1265a9d..edee8c8547d 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -517,6 +517,12 @@ void THD::awake(THD::killed_state state_to_set) bool THD::store_globals() { + /* + Assert that thread_stack is initialized: it's necessary to be able + to track stack overrun. + */ + DBUG_ASSERT(this->thread_stack); + if (my_pthread_setspecific_ptr(THR_THD, this) || my_pthread_setspecific_ptr(THR_MALLOC, &mem_root)) return 1; -- cgit v1.2.1