diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2015-04-22 13:29:56 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-05-13 15:56:56 +0400 |
commit | b22959903b89e798f8804ec9a815c88f75915cd9 (patch) | |
tree | 8b3443332de3bea57ced828a7932ade4add36ce0 /sql/item_subselect.h | |
parent | 8345bc692192788c25ec004134a3a095437aeb1c (diff) | |
download | mariadb-git-b22959903b89e798f8804ec9a815c88f75915cd9.tar.gz |
MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO
Added THD argument to select_result and all derivative classes.
This reduces number of pthread_getspecific calls from 796 to 776 per OLTP RO
transaction.
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r-- | sql/item_subselect.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 47a143e172a..6628a1bf86b 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -265,7 +265,7 @@ class Item_singlerow_subselect :public Item_subselect protected: Item_cache *value, **row; public: - Item_singlerow_subselect(st_select_lex *select_lex); + Item_singlerow_subselect(THD *thd_arg, st_select_lex *select_lex); Item_singlerow_subselect() :Item_subselect(), value(0), row (0) {} @@ -360,7 +360,7 @@ public: /* true if we got this from EXISTS or to IN */ bool exists_transformed; - Item_exists_subselect(st_select_lex *select_lex); + Item_exists_subselect(THD *thd_arg, st_select_lex *select_lex); Item_exists_subselect() :Item_subselect(), upper_not(NULL),abort_on_null(0), emb_on_expr_nest(NULL), optimizer(0), exists_transformed(0) @@ -566,7 +566,7 @@ public: Item_func_not_all *upper_item; // point on NOT/NOP before ALL/SOME subquery - Item_in_subselect(Item * left_expr, st_select_lex *select_lex); + 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), in_strategy(SUBS_NOT_TRANSFORMED), @@ -708,7 +708,8 @@ public: chooser_compare_func_creator func_creator; bool all; - Item_allany_subselect(Item * left_expr, chooser_compare_func_creator fc, + Item_allany_subselect(THD *thd_arg, Item * left_expr, + chooser_compare_func_creator fc, st_select_lex *select_lex, bool all); void cleanup(); @@ -982,7 +983,7 @@ public: This function is actually defined in sql_parse.cc, but it depends on chooser_compare_func_creator defined in this file. */ -Item * all_any_subquery_creator(Item *left_expr, +Item * all_any_subquery_creator(THD *thd, Item *left_expr, chooser_compare_func_creator cmp, bool all, SELECT_LEX *select_lex); |