diff options
author | unknown <knielsen@knielsen-hq.org> | 2012-03-22 13:21:15 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2012-03-22 13:21:15 +0100 |
commit | 8e0afbd8af846073e00271aa4721b066e6cfb112 (patch) | |
tree | 7367e549bd2dd7a63bdd3d0987100427c51790d5 /sql/opt_subselect.cc | |
parent | 5338a28912589f1169b66b880a489ec5636bcd83 (diff) | |
download | mariadb-git-8e0afbd8af846073e00271aa4721b066e6cfb112.tar.gz |
Backport some simple performance patches from 5.5.
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 4559b76764e..beb049ab66f 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -4933,7 +4933,6 @@ bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list, bool JOIN::choose_subquery_plan(table_map join_tables) { - Join_plan_state save_qep; /* The original QEP of the subquery. */ enum_reopt_result reopt_result= REOPT_NONE; Item_in_subselect *in_subs; @@ -4952,12 +4951,15 @@ bool JOIN::choose_subquery_plan(table_map join_tables) } else return false; + /* A strategy must be chosen earlier. */ DBUG_ASSERT(in_subs->has_strategy()); DBUG_ASSERT(in_to_exists_where || in_to_exists_having); DBUG_ASSERT(!in_to_exists_where || in_to_exists_where->fixed); DBUG_ASSERT(!in_to_exists_having || in_to_exists_having->fixed); + Join_plan_state save_qep; /* The original QEP of the subquery. */ + /* Compute and compare the costs of materialization and in-exists if both strategies are possible and allowed by the user (checked during the prepare |