summaryrefslogtreecommitdiff
path: root/plugin/feedback/feedback.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-08-11 11:18:38 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-08-21 10:40:39 +0400
commit31e365efae28ba3208e80511c4d18fe11a79541a (patch)
treef249682cc42490fc86382f5244a051001dc13c9e /plugin/feedback/feedback.cc
parent4374da63f03abc472f68f42e4e93261a18bfe417 (diff)
downloadmariadb-git-31e365efae28ba3208e80511c4d18fe11a79541a.tar.gz
MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)
Added mandatory thd parameter to Item (and all derivative classes) constructor. Added thd parameter to all routines that may create items. Also removed "current_thd" from Item::Item. This reduced number of pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
Diffstat (limited to 'plugin/feedback/feedback.cc')
-rw-r--r--plugin/feedback/feedback.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugin/feedback/feedback.cc b/plugin/feedback/feedback.cc
index 8cf4348079d..f1f4febc69e 100644
--- a/plugin/feedback/feedback.cc
+++ b/plugin/feedback/feedback.cc
@@ -99,20 +99,20 @@ static COND* make_cond(THD *thd, TABLE_LIST *tables, LEX_STRING *filter)
nrc.init();
nrc.resolve_in_table_list_only(tables);
- res= new Item_cond_or();
+ res= new Item_cond_or(thd);
if (!res)
return OOM;
for (; filter->str; filter++)
{
Item_field *fld= new Item_field(thd, &nrc, db, table, field);
- Item_string *pattern= new Item_string(filter->str, filter->length, cs);
- Item_string *escape= new Item_string("\\", 1, cs);
+ Item_string *pattern= new Item_string(thd, filter->str, filter->length, cs);
+ Item_string *escape= new Item_string(thd, "\\", 1, cs);
if (!fld || !pattern || !escape)
return OOM;
- Item_func_like *like= new Item_func_like(fld, pattern, escape, 0);
+ Item_func_like *like= new Item_func_like(thd, fld, pattern, escape, 0);
if (!like)
return OOM;