diff options
author | unknown <knielsen@knielsen-hq.org> | 2012-03-24 18:21:22 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2012-03-24 18:21:22 +0100 |
commit | 335de5db1834d3aeac507f18fcd5143c22150500 (patch) | |
tree | 95ac83922a28c81982c9ad89fcaba6c040b5111b /sql/opt_subselect.cc | |
parent | b34cfe9327f2dcedb6bebfacdc2e757b6285426d (diff) | |
parent | f72e0e686b2f3688fe98685107a293de5012be03 (diff) | |
download | mariadb-git-335de5db1834d3aeac507f18fcd5143c22150500.tar.gz |
Merge mariadb 5.3->mariadb 5.5
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 1f6524e5afa..8656ca605ab 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -1267,7 +1267,10 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) (a theory: a next_local chain always starts with ::leaf_tables because view's tables are inserted after the view) */ - for (tl= parent_lex->leaf_tables.head(); tl->next_local; tl= tl->next_local) ; + + for (tl= (TABLE_LIST*)(parent_lex->table_list.first); tl->next_local; tl= tl->next_local) + {} + tl->next_local= subq_lex->leaf_tables.head(); /* A theory: no need to re-connect the next_global chain */ @@ -1480,7 +1483,7 @@ static bool convert_subq_to_jtbm(JOIN *parent_join, (a theory: a next_local chain always starts with ::leaf_tables because view's tables are inserted after the view) */ - for (tl= parent_lex->leaf_tables.head(); tl->next_local; tl= tl->next_local) + for (tl= (TABLE_LIST*)(parent_lex->table_list.first); tl->next_local; tl= tl->next_local) {} tl->next_local= jtbm; @@ -4975,7 +4978,8 @@ bool JOIN::choose_subquery_plan(table_map join_tables) 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. */ + /* The original QEP of the subquery. */ + Join_plan_state save_qep(table_count); /* Compute and compare the costs of materialization and in-exists if both |