summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-08-20 15:24:13 +0300
committerSergey Vojtovich <svoj@mariadb.org>2015-08-21 10:40:51 +0400
commit1bae0d9e5669c2d03209082142e892417e24d09a (patch)
tree8702469bab1f515c78a06ede07ae4aeaa297c802 /sql/sql_table.cc
parent31e365efae28ba3208e80511c4d18fe11a79541a (diff)
downloadmariadb-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_table.cc')
-rw-r--r--sql/sql_table.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 453239e3bf9..0bf42a862f3 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -9626,9 +9626,9 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
*/
DBUG_ASSERT(! thd->in_sub_stmt);
- field_list.push_back(item = new Item_empty_string(thd, "Table", NAME_LEN*2));
+ field_list.push_back(item= new (thd->mem_root) Item_empty_string(thd, "Table", NAME_LEN*2));
item->maybe_null= 1;
- field_list.push_back(item= new Item_int(thd, "Checksum",
+ field_list.push_back(item= new (thd->mem_root) Item_int(thd, "Checksum",
(longlong) 1,
MY_INT64_NUM_DECIMAL_DIGITS));
item->maybe_null= 1;