mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1 configure.in: Auto merged sql/field.cc: Auto merged sql/item.cc: Auto merged sql/mysqld.cc: Auto merged sql/opt_range.cc: Auto merged sql/slave.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_select.cc: Auto merged sql/table.cc: Auto merged storage/innobase/btr/btr0cur.c: Auto merged storage/innobase/buf/buf0buf.c: Auto merged storage/innobase/include/rem0rec.h: Auto merged storage/innobase/include/rem0rec.ic: Auto merged storage/innobase/os/os0file.c: Auto merged storage/innobase/page/page0page.c: Auto merged storage/innobase/row/row0ins.c: Auto merged storage/innobase/trx/trx0rec.c: Auto merged storage/ndb/src/common/util/version.c: Auto merged sql/sql_insert.cc: Auto merged
This commit is contained in:
@ -662,7 +662,6 @@ public:
|
||||
itself to the list on creation (see Item::Item() for details))
|
||||
*/
|
||||
Item *free_list;
|
||||
MEM_ROOT main_mem_root;
|
||||
MEM_ROOT *mem_root; // Pointer to current memroot
|
||||
#ifndef DBUG_OFF
|
||||
bool backup_arena;
|
||||
@ -681,21 +680,14 @@ public:
|
||||
STATEMENT, PREPARED_STATEMENT, STORED_PROCEDURE
|
||||
};
|
||||
|
||||
Query_arena(MEM_ROOT *mem_root_arg, enum enum_state state_arg) :
|
||||
free_list(0), mem_root(mem_root_arg), state(state_arg)
|
||||
{}
|
||||
/*
|
||||
This constructor is used only when Query_arena is created as
|
||||
backup storage for another instance of Query_arena.
|
||||
*/
|
||||
Query_arena() {};
|
||||
/*
|
||||
Create arena for already constructed THD using its variables as
|
||||
parameters for memory root initialization.
|
||||
*/
|
||||
Query_arena(THD *thd);
|
||||
/*
|
||||
Create arena and optionally init memory root with minimal values.
|
||||
Particularly used if Query_arena is part of Statement.
|
||||
*/
|
||||
Query_arena(bool init_mem_root);
|
||||
virtual Type type() const;
|
||||
virtual ~Query_arena() {};
|
||||
|
||||
@ -709,6 +701,7 @@ public:
|
||||
{ return state == PREPARED || state == EXECUTED; }
|
||||
inline bool is_conventional() const
|
||||
{ return state == CONVENTIONAL_EXECUTION; }
|
||||
|
||||
inline gptr alloc(unsigned int size) { return alloc_root(mem_root,size); }
|
||||
inline gptr calloc(unsigned int size)
|
||||
{
|
||||
@ -758,7 +751,8 @@ class Statement: public Query_arena
|
||||
Statement(const Statement &rhs); /* not implemented: */
|
||||
Statement &operator=(const Statement &rhs); /* non-copyable */
|
||||
public:
|
||||
/* FIXME: must be private */
|
||||
/* FIXME: these must be protected */
|
||||
MEM_ROOT main_mem_root;
|
||||
LEX main_lex;
|
||||
|
||||
/*
|
||||
@ -1396,7 +1390,7 @@ public:
|
||||
already changed to use this arena.
|
||||
*/
|
||||
if (!current_arena->is_conventional() &&
|
||||
mem_root != ¤t_arena->main_mem_root)
|
||||
mem_root != current_arena->mem_root)
|
||||
{
|
||||
set_n_backup_item_arena(current_arena, backup);
|
||||
return current_arena;
|
||||
|
Reference in New Issue
Block a user