summaryrefslogtreecommitdiff
path: root/sql/item_row.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 /sql/item_row.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 'sql/item_row.cc')
-rw-r--r--sql/item_row.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc
index 8b32f56973a..b1575b81087 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -146,13 +146,13 @@ void Item_row::print(String *str, enum_query_type query_type)
}
-Item *Item_row::transform(Item_transformer transformer, uchar *arg)
+Item *Item_row::transform(THD *thd, Item_transformer transformer, uchar *arg)
{
- DBUG_ASSERT(!current_thd->stmt_arena->is_stmt_prepare());
+ DBUG_ASSERT(!thd->stmt_arena->is_stmt_prepare());
- if (transform_args(transformer, arg))
+ if (transform_args(thd, transformer, arg))
return 0;
- return (this->*transformer)(arg);
+ return (this->*transformer)(thd, arg);
}
void Item_row::bring_value()