mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +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:
@@ -137,7 +137,7 @@ bool sp_rcontext::init_var_items(THD *thd)
|
||||
|
||||
for (uint idx = 0; idx < num_vars; ++idx)
|
||||
{
|
||||
if (!(m_var_items[idx]= new Item_field(thd, m_var_table->field[idx])))
|
||||
if (!(m_var_items[idx]= new (thd->mem_root) Item_field(thd, m_var_table->field[idx])))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user