mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Post-merge fixes.
This commit is contained in:
@ -1354,67 +1354,3 @@ void TMP_TABLE_PARAM::init()
|
||||
group_parts= group_length= group_null_parts= 0;
|
||||
quick_group= 1;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Statement functions
|
||||
****************************************************************************/
|
||||
|
||||
Statement::Statement(THD *thd)
|
||||
:id(++thd->statement_id_counter),
|
||||
query_id(0), /* initialized later */
|
||||
set_query_id(1),
|
||||
allow_sum_func(0), /* initialized later */
|
||||
command(COM_SLEEP), /* initialized later */
|
||||
lex(&main_lex),
|
||||
query(0), /* these two are set */
|
||||
query_length(0), /* in alloc_query() */
|
||||
free_list(0)
|
||||
{
|
||||
init_sql_alloc(&mem_root,
|
||||
thd->variables.query_alloc_block_size,
|
||||
thd->variables.query_prealloc_size);
|
||||
}
|
||||
|
||||
|
||||
Statement::Statement()
|
||||
:id(0),
|
||||
query_id(0),
|
||||
set_query_id(1),
|
||||
allow_sum_func(0),
|
||||
command(COM_SLEEP),
|
||||
lex(&main_lex),
|
||||
query(0),
|
||||
query_length(0),
|
||||
free_list(0)
|
||||
{
|
||||
bzero((char *) &mem_root, sizeof(mem_root));
|
||||
}
|
||||
|
||||
|
||||
Statement::~Statement()
|
||||
{
|
||||
free_root(&mem_root, MYF(0));
|
||||
}
|
||||
|
||||
|
||||
C_MODE_START
|
||||
|
||||
static byte *
|
||||
get_statement_id_as_hash_key(const byte *record, uint *key_length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
{
|
||||
const Statement *statement= (const Statement *) record;
|
||||
*key_length= sizeof(statement->id);
|
||||
return (byte *) &((const Statement *) statement)->id;
|
||||
}
|
||||
|
||||
C_MODE_END
|
||||
|
||||
|
||||
Statement_map::Statement_map()
|
||||
{
|
||||
enum { START_HASH_SIZE = 16 };
|
||||
hash_init(&st_hash, default_charset_info, START_HASH_SIZE, 0, 0,
|
||||
get_statement_id_as_hash_key, (hash_free_key) 0, MYF(0));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user