1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

THD::init_for_queries() pushed back:

see comments to the method why


sql/sql_class.h:
  THD::init_for_queries() pushed back:
  see comments to the method why
  Cleanup
This commit is contained in:
unknown
2003-12-21 22:26:45 +03:00
parent b4b8d1f677
commit 2fe005174f
4 changed files with 30 additions and 7 deletions

View File

@@ -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