summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-11-23 21:18:10 +0300
committerunknown <konstantin@mysql.com>2005-11-23 21:18:10 +0300
commit0633a41c154fdf4f38880072b6f9356b2d6c2bd8 (patch)
tree82cf7863e471a48c80281113d66a428d0a2c3a1c /sql/sql_acl.cc
parent4aea839bde48c615d2d672ebbd29f20c297fe670 (diff)
downloadmariadb-git-0633a41c154fdf4f38880072b6f9356b2d6c2bd8.tar.gz
Always initialize THD::thread_stack: it's used in
check_stack_overrun(). sql/slave.cc: Move initialization of THD::thread_stack before THD::store_globals() sql/sql_acl.cc: Initialize THD::thread_stack in artificial THDs used to load gratns subsystem. sql/sql_class.cc: Add an assert that THD::thread_stack is assigned. sql/sql_insert.cc: Add initialization of THD::thread_stack (delayed insert thread). sql/sql_parse.cc: Move initialization of THD::thread_stack before THD::store_globals(). sql/sql_udf.cc: Add initialization for THD::thread_stack (an artificial THD used to initialize UDF subsystem). sql/tztime.cc: Add initialization for THD::thread_stack (an artificial THD used to initialize timezones).
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index a572f03b575..46be74ae972 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -158,6 +158,7 @@ my_bool acl_init(bool dont_read_acl_tables)
*/
if (!(thd=new THD))
DBUG_RETURN(1); /* purecov: inspected */
+ thd->thread_stack= (char*) &thd;
thd->store_globals();
/*
It is safe to call acl_reload() since acl_* arrays and hashes which
@@ -3263,6 +3264,7 @@ my_bool grant_init()
if (!(thd= new THD))
DBUG_RETURN(1); /* purecov: deadcode */
+ thd->thread_stack= (char*) &thd;
thd->store_globals();
return_val= grant_reload(thd);
delete thd;