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;
|
group_parts= group_length= group_null_parts= 0;
|
||||||
quick_group= 1;
|
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));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -937,6 +937,13 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length)
|
|||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
|
||||||
yyparse_err:
|
yyparse_err:
|
||||||
|
if (thd->lex->sphead)
|
||||||
|
{
|
||||||
|
if (lex != thd->lex)
|
||||||
|
thd->lex->sphead->restore_lex(thd);
|
||||||
|
delete thd->lex->sphead;
|
||||||
|
thd->lex->sphead= NULL;
|
||||||
|
}
|
||||||
lex_end(lex);
|
lex_end(lex);
|
||||||
stmt->set_statement(thd);
|
stmt->set_statement(thd);
|
||||||
thd->set_statement(&thd->stmt_backup);
|
thd->set_statement(&thd->stmt_backup);
|
||||||
|
@ -6735,8 +6735,8 @@ static void test_explain_bug()
|
|||||||
verify_prepare_field(result,5,"key","",MYSQL_TYPE_VAR_STRING,
|
verify_prepare_field(result,5,"key","",MYSQL_TYPE_VAR_STRING,
|
||||||
"","","",NAME_LEN,0);
|
"","","",NAME_LEN,0);
|
||||||
|
|
||||||
verify_prepare_field(result,6,"key_len","",MYSQL_TYPE_LONGLONG,
|
verify_prepare_field(result,6,"key_len","",MYSQL_TYPE_VAR_STRING,
|
||||||
"","","",3,0);
|
"","","",NAME_LEN*32,0);
|
||||||
|
|
||||||
verify_prepare_field(result,7,"ref","",MYSQL_TYPE_VAR_STRING,
|
verify_prepare_field(result,7,"ref","",MYSQL_TYPE_VAR_STRING,
|
||||||
"","","",NAME_LEN*16,0);
|
"","","",NAME_LEN*16,0);
|
||||||
|
Reference in New Issue
Block a user