mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge mysql.com:/home/my/mysql-5.0
into mysql.com:/home/my/mysql-5.1 BitKeeper/etc/ignore: auto-union include/my_global.h: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/grant.result: Auto merged sql/ha_federated.cc: Auto merged sql/mysql_priv.h: Auto merged sql/slave.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/examples/ha_tina.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_udf.cc: Auto merged sql/tztime.cc: Auto merged sql/unireg.h: Auto merged sql/examples/ha_tina.cc: manual merge sql/share/errmsg.txt: manual merge
This commit is contained in:
@ -1091,6 +1091,7 @@ pthread_handler_t handle_one_connection(void *arg)
|
||||
VOID(sigemptyset(&set)); // Get mask in use
|
||||
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));
|
||||
#endif
|
||||
thd->thread_stack= (char*) &thd;
|
||||
if (thd->store_globals())
|
||||
{
|
||||
close_connection(thd, ER_OUT_OF_RESOURCES, 1);
|
||||
@ -1104,7 +1105,6 @@ pthread_handler_t handle_one_connection(void *arg)
|
||||
int error;
|
||||
NET *net= &thd->net;
|
||||
Security_context *sctx= thd->security_ctx;
|
||||
thd->thread_stack= (char*) &thd;
|
||||
net->no_send_error= 0;
|
||||
|
||||
if ((error=check_connection(thd)))
|
||||
@ -1195,6 +1195,7 @@ pthread_handler_t handle_bootstrap(void *arg)
|
||||
char *buff;
|
||||
|
||||
/* The following must be called before DBUG_ENTER */
|
||||
thd->thread_stack= (char*) &thd;
|
||||
if (my_thread_init() || thd->store_globals())
|
||||
{
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
@ -5286,6 +5287,7 @@ bool check_stack_overrun(THD *thd, long margin,
|
||||
char *buf __attribute__((unused)))
|
||||
{
|
||||
long stack_used;
|
||||
DBUG_ASSERT(thd == current_thd);
|
||||
if ((stack_used=used_stack(thd->thread_stack,(char*) &stack_used)) >=
|
||||
(long) (thread_stack - margin))
|
||||
{
|
||||
@ -6735,7 +6737,10 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
|
||||
allocate temporary THD for execution of acl_reload()/grant_reload().
|
||||
*/
|
||||
if (!thd && (thd= (tmp_thd= new THD)))
|
||||
{
|
||||
thd->thread_stack= (char*) &tmp_thd;
|
||||
thd->store_globals();
|
||||
}
|
||||
if (thd)
|
||||
{
|
||||
(void)acl_reload(thd);
|
||||
|
Reference in New Issue
Block a user