diff options
author | Monty <monty@mariadb.org> | 2015-08-20 15:24:13 +0300 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-08-21 10:40:51 +0400 |
commit | 1bae0d9e5669c2d03209082142e892417e24d09a (patch) | |
tree | 8702469bab1f515c78a06ede07ae4aeaa297c802 /sql/sql_select.h | |
parent | 31e365efae28ba3208e80511c4d18fe11a79541a (diff) | |
download | mariadb-git-1bae0d9e5669c2d03209082142e892417e24d09a.tar.gz |
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
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 71233af9845..ca69c0c23eb 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -1852,7 +1852,7 @@ int join_read_record_no_init(JOIN_TAB *tab); void set_position(JOIN *join,uint idx,JOIN_TAB *table,KEYUSE *key); inline Item * and_items(THD *thd, Item* cond, Item *item) { - return (cond ? (new Item_cond_and(thd, cond, item)) : item); + return (cond ? (new (thd->mem_root) Item_cond_and(thd, cond, item)) : item); } bool choose_plan(JOIN *join, table_map join_tables); void optimize_wo_join_buffering(JOIN *join, uint first_tab, uint last_tab, |