summaryrefslogtreecommitdiff
path: root/storage/sphinx
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 /storage/sphinx
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 'storage/sphinx')
-rw-r--r--storage/sphinx/ha_sphinx.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/sphinx/ha_sphinx.cc b/storage/sphinx/ha_sphinx.cc
index 25cedf3547b..568d3695781 100644
--- a/storage/sphinx/ha_sphinx.cc
+++ b/storage/sphinx/ha_sphinx.cc
@@ -2335,10 +2335,11 @@ int ha_sphinx::write_row ( byte * )
} else
{
+ THD *thd= ha_thd();
if ( (*ppField)->type()==MYSQL_TYPE_TIMESTAMP )
{
- Item_field * pWrap = new Item_field ( ha_thd(), *ppField ); // autofreed by query arena, I assume
- Item_func_unix_timestamp * pConv = new Item_func_unix_timestamp ( ha_thd(), pWrap );
+ Item_field * pWrap = new (thd->mem_root) Item_field(thd, *ppField); // autofreed by query arena, I assume
+ Item_func_unix_timestamp * pConv = new (thd->mem_root) Item_func_unix_timestamp(thd, pWrap);
pConv->quick_fix_field();
unsigned int uTs = (unsigned int) pConv->val_int();