diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-11-22 18:04:38 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-11-22 18:04:38 +0100 |
commit | d2755a2c9c109ddb4e2e0c9feda89431a6c4fd50 (patch) | |
tree | c6e4678908c750d7f558e98cedc349aa1d350892 /sql/opt_table_elimination.cc | |
parent | af32b02c06f32a89dc9f52e556bc5dd3bf49c19e (diff) | |
parent | 42221abaed700f6dc5d280b462755851780e8487 (diff) | |
download | mariadb-git-d2755a2c9c109ddb4e2e0c9feda89431a6c4fd50.tar.gz |
5.3->5.5 merge
Diffstat (limited to 'sql/opt_table_elimination.cc')
-rw-r--r-- | sql/opt_table_elimination.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc index 9ab6e0e84d2..3de73c3d4cc 100644 --- a/sql/opt_table_elimination.cc +++ b/sql/opt_table_elimination.cc @@ -587,10 +587,8 @@ void eliminate_tables(JOIN *join) if (!join->outer_join) DBUG_VOID_RETURN; -#ifndef DBUG_OFF if (!optimizer_flag(thd, OPTIMIZER_SWITCH_TABLE_ELIMINATION)) DBUG_VOID_RETURN; /* purecov: inspected */ -#endif /* Find the tables that are referred to from WHERE/HAVING */ used_tables= (join->conds? join->conds->used_tables() : 0) | @@ -694,6 +692,8 @@ eliminate_tables_for_list(JOIN *join, List<TABLE_LIST> *join_list, { table_map outside_used_tables= tables_used_elsewhere | tables_used_on_left; + if (on_expr) + outside_used_tables |= on_expr->used_tables(); if (tbl->nested_join) { /* This is "... LEFT JOIN (join_nest) ON cond" */ |