summaryrefslogtreecommitdiff
path: root/sql/sql_join_cache.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2014-09-09 16:44:54 -0700
committerIgor Babaev <igor@askmonty.org>2014-09-09 16:44:54 -0700
commit5023bb899dfaf78d85be2e6c08ec22cadcbcf82a (patch)
treed46cc221db447c9155e19a1f15eca3be392c8bd5 /sql/sql_join_cache.cc
parent20fff8e5bd41aeb8b8c0295dabc3096ba3620099 (diff)
downloadmariadb-git-5023bb899dfaf78d85be2e6c08ec22cadcbcf82a.tar.gz
Fixed bug mdev-6292.
Avoided exponential recursive calls of JOIN_CACHE::join_records() in the case of non-nested outer joins. A different solution is required to resolve this performance problem for nested outer joins.
Diffstat (limited to 'sql/sql_join_cache.cc')
-rw-r--r--sql/sql_join_cache.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc
index 6ffd0f20b5e..49b523b61be 100644
--- a/sql/sql_join_cache.cc
+++ b/sql/sql_join_cache.cc
@@ -2087,7 +2087,7 @@ enum_nested_loop_state JOIN_CACHE::join_records(bool skip_last)
goto finish;
if (outer_join_first_inner)
{
- if (next_cache)
+ if (next_cache && join_tab != join_tab->last_inner)
{
/*
Ensure that all matches for outer records from join buffer are to be