summaryrefslogtreecommitdiff
path: root/sql/sql_join_cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_join_cache.cc')
-rw-r--r--sql/sql_join_cache.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc
index 8986e4c42ac..3b051259ad6 100644
--- a/sql/sql_join_cache.cc
+++ b/sql/sql_join_cache.cc
@@ -2147,7 +2147,8 @@ enum_nested_loop_state JOIN_CACHE::join_records(bool skip_last)
}
finish:
- if (outer_join_first_inner)
+ if (outer_join_first_inner &&
+ join_tab->first_inner == join_tab->first_unmatched)
{
/*
All null complemented rows have been already generated for all