diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2015-08-11 11:18:38 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-08-21 10:40:39 +0400 |
commit | 31e365efae28ba3208e80511c4d18fe11a79541a (patch) | |
tree | f249682cc42490fc86382f5244a051001dc13c9e /sql/sql_expression_cache.cc | |
parent | 4374da63f03abc472f68f42e4e93261a18bfe417 (diff) | |
download | mariadb-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/sql_expression_cache.cc')
-rw-r--r-- | sql/sql_expression_cache.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_expression_cache.cc b/sql/sql_expression_cache.cc index cc922c3bcfe..f9d2f599804 100644 --- a/sql/sql_expression_cache.cc +++ b/sql/sql_expression_cache.cc @@ -161,7 +161,7 @@ void Expression_cache_tmptable::init() goto error; } - if (!(cached_result= new Item_field(cache_table->field[0]))) + if (!(cached_result= new Item_field(table_thd, cache_table->field[0]))) { DBUG_PRINT("error", ("Creating Item_field failed")); goto error; |