1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
- 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.


sql/item.cc:
  Rename.
sql/item_cmpfunc.cc:
  Rename.
sql/item_func.cc:
  Rename.
sql/item_subselect.cc:
  Rename.
sql/item_subselect.h:
  Remove an unused forward declaration.
sql/item_sum.h:
  Remove an unused forward declaration.
sql/mysql_priv.h:
  Remove an unused forward declaration.
sql/sp.cc:
  Rename.
sql/sp_head.cc:
  Rename.
sql/sql_base.cc:
  Rename.
sql/sql_class.cc:
  Rename.
sql/sql_class.h:
  Rename.
sql/sql_lex.cc:
  Rename.
sql/sql_parse.cc:
  Rename.
sql/sql_prepare.cc:
  Rename.
sql/sql_select.cc:
  Rename.
sql/sql_show.cc:
  Rename.
sql/sql_union.cc:
  Rename.
sql/sql_view.cc:
  Rename.
sql/table.cc:
  Rename.
This commit is contained in:
unknown
2005-09-02 17:21:19 +04:00
parent aeb7fe836a
commit dc92221300
20 changed files with 128 additions and 137 deletions

View File

@@ -1504,7 +1504,7 @@ bool st_select_lex::setup_ref_array(THD *thd, uint order_group_num)
We have to create array in prepared statement memory if it is
prepared statement
*/
Query_arena *arena= thd->current_arena;
Query_arena *arena= thd->stmt_arena;
return (ref_pointer_array=
(Item **)arena->alloc(sizeof(Item*) *
(item_list.elements +
@@ -1826,7 +1826,7 @@ void st_select_lex_unit::set_limit(SELECT_LEX *sl)
{
ha_rows select_limit_val;
DBUG_ASSERT(! thd->current_arena->is_stmt_prepare());
DBUG_ASSERT(! thd->stmt_arena->is_stmt_prepare());
select_limit_val= (ha_rows)(sl->select_limit ? sl->select_limit->val_uint() :
HA_POS_ERROR);
offset_limit_cnt= (ha_rows)(sl->offset_limit ? sl->offset_limit->val_uint() :
@@ -2038,7 +2038,7 @@ void st_lex::cleanup_after_one_table_open()
void st_select_lex::fix_prepare_information(THD *thd, Item **conds)
{
if (!thd->current_arena->is_conventional() && first_execution)
if (!thd->stmt_arena->is_conventional() && first_execution)
{
first_execution= 0;
if (*conds)