summaryrefslogtreecommitdiff
path: root/sql/item_subselect.h
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_subselect.h
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_subselect.h')
-rw-r--r--sql/item_subselect.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 4702d5abbfa..27d06d715b5 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -128,7 +128,7 @@ public:
enum subs_type {UNKNOWN_SUBS, SINGLEROW_SUBS,
EXISTS_SUBS, IN_SUBS, ALL_SUBS, ANY_SUBS};
- Item_subselect();
+ Item_subselect(THD *thd);
virtual subs_type substype() { return UNKNOWN_SUBS; }
bool is_in_predicate()
@@ -269,7 +269,7 @@ protected:
Item_cache *value, **row;
public:
Item_singlerow_subselect(THD *thd_arg, st_select_lex *select_lex);
- Item_singlerow_subselect() :Item_subselect(), value(0), row (0)
+ Item_singlerow_subselect(THD *thd_arg): Item_subselect(thd_arg), value(0), row (0)
{}
void cleanup();
@@ -311,7 +311,7 @@ public:
*/
st_select_lex* invalidate_and_restore_select_lex();
- Item* expr_cache_insert_transformer(uchar *thd_arg);
+ Item* expr_cache_insert_transformer(THD *thd, uchar *unused);
friend class select_singlerow_subselect;
};
@@ -364,8 +364,8 @@ public:
bool exists_transformed;
Item_exists_subselect(THD *thd_arg, st_select_lex *select_lex);
- Item_exists_subselect()
- :Item_subselect(), upper_not(NULL),abort_on_null(0),
+ Item_exists_subselect(THD *thd_arg):
+ Item_subselect(thd_arg), upper_not(NULL), abort_on_null(0),
emb_on_expr_nest(NULL), optimizer(0), exists_transformed(0)
{}
@@ -391,7 +391,7 @@ public:
inline bool is_top_level_item() { return abort_on_null; }
bool exists2in_processor(uchar *opt_arg);
- Item* expr_cache_insert_transformer(uchar *thd_arg);
+ Item* expr_cache_insert_transformer(THD *thd, uchar *unused);
void mark_as_condition_AND_part(TABLE_LIST *embedding)
{
@@ -570,8 +570,8 @@ public:
Item_func_not_all *upper_item; // point on NOT/NOP before ALL/SOME subquery
Item_in_subselect(THD *thd_arg, Item * left_expr, st_select_lex *select_lex);
- Item_in_subselect()
- :Item_exists_subselect(), left_expr_cache(0), first_execution(TRUE),
+ Item_in_subselect(THD *thd_arg):
+ Item_exists_subselect(thd_arg), left_expr_cache(0), first_execution(TRUE),
in_strategy(SUBS_NOT_TRANSFORMED),
pushed_cond_guards(NULL), func(NULL), is_jtbm_merged(FALSE),
is_jtbm_const_tab(FALSE), upper_item(0) {}