mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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.
This commit is contained in:
@ -1708,7 +1708,16 @@ JOIN::cleanup()
|
||||
|
||||
|
||||
/************************* Cursor ******************************************/
|
||||
|
||||
|
||||
Cursor::Cursor(THD *thd)
|
||||
:Query_arena(&main_mem_root, INITIALIZED),
|
||||
join(0), unit(0)
|
||||
{
|
||||
/* We will overwrite it at open anyway. */
|
||||
init_sql_alloc(&main_mem_root, ALLOC_ROOT_MIN_BLOCK_SIZE, 0);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Cursor::init_from_thd(THD *thd)
|
||||
{
|
||||
|
Reference in New Issue
Block a user