mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Stage 2 of MDEV-6152:
- Added mem_root to all calls to new Item - Added private method operator new(size_t size) to Item to ensure that we always use a mem_root when creating an item. This saves use once call to current_thd per Item creation
This commit is contained in:
@ -342,6 +342,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
bool is_union_select;
|
||||
bool instantiate_tmp_table= false;
|
||||
DBUG_ENTER("st_select_lex_unit::prepare");
|
||||
DBUG_ASSERT(thd == thd_arg && thd == current_thd);
|
||||
|
||||
describe= MY_TEST(additional_options & SELECT_DESCRIBE);
|
||||
|
||||
@ -484,7 +485,8 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
while ((item_tmp= it++))
|
||||
{
|
||||
/* Error's in 'new' will be detected after loop */
|
||||
types.push_back(new Item_type_holder(thd_arg, item_tmp));
|
||||
types.push_back(new (thd_arg->mem_root)
|
||||
Item_type_holder(thd_arg, item_tmp));
|
||||
}
|
||||
|
||||
if (thd_arg->is_fatal_error)
|
||||
|
Reference in New Issue
Block a user