summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2015-05-13 16:17:22 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2015-10-29 21:05:00 +0100
commitfb4358f4324cfb9cec5c1f7c52ffa90839a2fe69 (patch)
tree73c42861788e6bd154aa0fda14f088c3c20f1ad5 /sql/opt_subselect.cc
parent937aa7ad774e0d73a2e97d46bfdaba006ff7fe1d (diff)
downloadmariadb-git-fb4358f4324cfb9cec5c1f7c52ffa90839a2fe69.tar.gz
MDEV-7949: Item_field::used_tables() takes 0.29% in OLTP RO
small sixes of used_tables() usage
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 1566ab43074..4b21ffebe1f 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -1570,8 +1570,9 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred)
DBUG_RETURN(TRUE);
thd->lex->current_select=save_lex;
- sj_nest->nested_join->sj_corr_tables= subq_pred->used_tables();
- sj_nest->nested_join->sj_depends_on= subq_pred->used_tables() |
+ table_map subq_pred_used_tables= subq_pred->used_tables();
+ sj_nest->nested_join->sj_corr_tables= subq_pred_used_tables;
+ sj_nest->nested_join->sj_depends_on= subq_pred_used_tables |
subq_pred->left_expr->used_tables();
sj_nest->sj_on_expr= subq_lex->join->conds;