mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
THD::init_for_queries() pushed back:
see comments to the method why
This commit is contained in:
@ -144,9 +144,6 @@ THD::THD():user_time(0), is_fatal_error(0),
|
||||
*scramble= '\0';
|
||||
|
||||
init();
|
||||
init_sql_alloc(&mem_root, // must be after init()
|
||||
variables.query_alloc_block_size,
|
||||
variables.query_prealloc_size);
|
||||
/* Initialize sub structures */
|
||||
bzero((char*) &transaction.mem_root,sizeof(transaction.mem_root));
|
||||
bzero((char*) &warn_root,sizeof(warn_root));
|
||||
@ -182,9 +179,6 @@ THD::THD():user_time(0), is_fatal_error(0),
|
||||
transaction.trans_log.end_of_file= max_binlog_cache_size;
|
||||
}
|
||||
#endif
|
||||
init_sql_alloc(&transaction.mem_root,
|
||||
variables.trans_alloc_block_size,
|
||||
variables.trans_prealloc_size);
|
||||
/*
|
||||
We need good random number initialization for new thread
|
||||
Just coping global one will not work
|
||||
@ -227,6 +221,23 @@ void THD::init(void)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Init THD for query processing.
|
||||
This has to be called once before we call mysql_parse.
|
||||
See also comments in sql_class.h.
|
||||
*/
|
||||
|
||||
void THD::init_for_queries()
|
||||
{
|
||||
init_sql_alloc(&mem_root,
|
||||
variables.query_alloc_block_size,
|
||||
variables.query_prealloc_size);
|
||||
init_sql_alloc(&transaction.mem_root,
|
||||
variables.trans_alloc_block_size,
|
||||
variables.trans_prealloc_size);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Do what's needed when one invokes change user
|
||||
|
||||
|
Reference in New Issue
Block a user