mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Rename:
- current_arena to stmt_arena: the thread may have more than one 'current' arenas: one for runtime data, and one for the parsed tree of a statement. Only one of them is active at any moment. - set_item_arena -> set_query_arena, because Item_arena was renamed to Query_arena a while ago - set_n_backup_item_arena -> set_n_backup_active_arena; the active arena is the arena thd->mem_root and thd->free_list are currently pointing at. - restore_backup_item_arena -> restore_active_arena (with the same rationale) - change_arena_if_needed -> activate_stmt_arena_if_needed; this method sets thd->stmt_arena active if it's not done yet.
This commit is contained in:
@@ -5275,7 +5275,7 @@ mysql_new_select(LEX *lex, bool move_down)
|
||||
it's a constant one. The flag is switched off in the end of
|
||||
mysql_stmt_prepare.
|
||||
*/
|
||||
if (thd->current_arena->is_stmt_prepare())
|
||||
if (thd->stmt_arena->is_stmt_prepare())
|
||||
select_lex->uncacheable|= UNCACHEABLE_PREPARE;
|
||||
if (move_down)
|
||||
{
|
||||
@@ -6081,7 +6081,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
ptr->db= empty_c_string;
|
||||
ptr->db_length= 0;
|
||||
}
|
||||
if (thd->current_arena->is_stmt_prepare_or_first_sp_execute())
|
||||
if (thd->stmt_arena->is_stmt_prepare_or_first_sp_execute())
|
||||
ptr->db= thd->strdup(ptr->db);
|
||||
|
||||
ptr->alias= alias_str;
|
||||
@@ -7301,7 +7301,7 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
|
||||
against the opened tables to ensure we don't use a table that is part
|
||||
of the view (which can only be done after the table has been opened).
|
||||
*/
|
||||
if (thd->current_arena->is_stmt_prepare_or_first_sp_execute())
|
||||
if (thd->stmt_arena->is_stmt_prepare_or_first_sp_execute())
|
||||
{
|
||||
/*
|
||||
For temporary tables we don't have to check if the created table exists
|
||||
|
||||
Reference in New Issue
Block a user