summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-06-22 11:59:13 +0400
committerunknown <konstantin@mysql.com>2005-06-22 11:59:13 +0400
commit40f0738b9c70be6c2c7419b7de0c35f895906ae1 (patch)
tree702b9de106d4c975641e3135e14a935a1938fa72 /sql/sp_head.cc
parent04f6f63dd8bdcb4e0d5e7cc6b2200a87eff037fe (diff)
downloadmariadb-git-40f0738b9c70be6c2c7419b7de0c35f895906ae1.tar.gz
Adjust to the changed Query_arena constructor:
main_mem_root is moved out of class Query_arena. sql/sp_head.cc: Adjust to the changed Query_arena constructor. main_mem_root is moved out of class Query_arena. sql/sp_head.h: main_mem_root is moved out of class Query_arena: add it to class sp_head. sql/sql_class.cc: main_mem_root is moved out of class Query_arena: remove constructors no longer relevant, remove dead code. sql/sql_class.h: main_mem_root is moved out of class Query_arena. sql/sql_prepare.cc: It's better to not use main_mem_root anywhere: logically, it's not a public member (can't fix sp_head::make_field and Item_subselect::exec to make it protected) sql/sql_select.cc: New Cursor constructor, which avoids unneeded memory allocation when initializign main_mem_root. sql/sql_select.h: main_mem_root is moved out of class Query_arena.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index fae657a8caf..2b1ab415aec 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -310,7 +310,8 @@ sp_head::operator delete(void *ptr, size_t size)
sp_head::sp_head()
- :Query_arena((bool)FALSE), m_returns_cs(NULL), m_has_return(FALSE),
+ :Query_arena(&main_mem_root, INITIALIZED_FOR_SP),
+ m_returns_cs(NULL), m_has_return(FALSE),
m_simple_case(FALSE), m_multi_results(FALSE), m_in_handler(FALSE)
{
extern byte *
@@ -319,7 +320,6 @@ sp_head::sp_head()
*sp_lex_sp_key(const byte *ptr, uint *plen, my_bool first);
DBUG_ENTER("sp_head::sp_head");
- state= INITIALIZED_FOR_SP;
m_backpatch.empty();
m_lex.empty();
hash_init(&m_sptabs, system_charset_info, 0, 0, 0, sp_table_key, 0, 0);