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:
@ -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
|
||||
|
Reference in New Issue
Block a user