summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index ebbd4302f39..f2ca7fb1c20 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -8934,7 +8934,7 @@ make_outerjoin_info(JOIN *join)
TABLE_LIST *tbl= table->pos_in_table_list;
TABLE_LIST *embedding= tbl->embedding;
- if (tbl->outer_join)
+ if (tbl->outer_join & (JOIN_TYPE_LEFT | JOIN_TYPE_RIGHT))
{
/*
Table tab is the only one inner table for outer join.
@@ -13384,7 +13384,8 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top,
table->embedding->nested_join->not_null_tables|= not_null_tables;
}
- if (!table->outer_join || (used_tables & not_null_tables))
+ if (!(table->outer_join & (JOIN_TYPE_LEFT | JOIN_TYPE_RIGHT)) ||
+ (used_tables & not_null_tables))
{
/*
For some of the inner tables there are conjunctive predicates