diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-01-17 17:51:10 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-01-17 17:51:10 +0300 |
commit | b83cb52e9e78a0d07c05f6515aa7811deabe434c (patch) | |
tree | aa289e64cb57964bd08fc79d326136cb801e1da7 /sql/opt_table_elimination.cc | |
parent | 1a490f2da492f2e5698b244341696c6dd9d8db4c (diff) | |
download | mariadb-git-b83cb52e9e78a0d07c05f6515aa7811deabe434c.tar.gz |
Backport of subquery optimizations to 5.3.
There are still test failures because of:
- Wrong query results in outer join + semi join
- EXPLAIN output differences
Diffstat (limited to 'sql/opt_table_elimination.cc')
-rw-r--r-- | sql/opt_table_elimination.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc index ef2a92f1797..aa69867688b 100644 --- a/sql/opt_table_elimination.cc +++ b/sql/opt_table_elimination.cc @@ -725,7 +725,11 @@ eliminate_tables_for_list(JOIN *join, List<TABLE_LIST> *join_list, } else { - DBUG_ASSERT(!tbl->nested_join); + DBUG_ASSERT(!tbl->nested_join || tbl->sj_on_expr); + //psergey-todo: is the following really correct or we'll need to descend + //down all ON clauses: ? + if (tbl->sj_on_expr) + tables_used_on_left |= tbl->sj_on_expr->used_tables(); } } |