1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

join.result, select.result:

Fixed bug #4976.
join_nested.result, join_nested.test:
  Added a test case for bug #4976.
sql_select.cc:
  Applied conversion from an outer join to an inner join 
  when the on expression does not depend on the outer table.
  It fixed bug #4976.
This commit is contained in:
igor@rurik.mysql.com
2004-08-10 17:32:15 -07:00
parent ff433d570b
commit 43bf2d055f
5 changed files with 46 additions and 7 deletions

View File

@ -6077,8 +6077,10 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top)
table->embedding->nested_join->used_tables|= used_tables;
table->embedding->nested_join->not_null_tables|= not_null_tables;
}
if (!table->outer_join || (used_tables & not_null_tables))
if (!table->outer_join || (used_tables & not_null_tables) ||
(table->outer_join &&
!(table->on_expr->used_tables() & ~used_tables)))
{
/*
For some of the inner tables there are conjunctive predicates