diff options
author | Igor Babaev <igor@askmonty.org> | 2019-05-28 14:53:08 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2019-05-28 14:53:08 -0700 |
commit | eb09580b67ee19f7ac30c1a41c8307b9c7d482d1 (patch) | |
tree | d8c9873b952d9cdcb403fda8c4a64650875c24e2 /sql/sql_join_cache.cc | |
parent | 0955462d0aafab01def9c1a5ec131eb641cb9e68 (diff) | |
download | mariadb-git-eb09580b67ee19f7ac30c1a41c8307b9c7d482d1.tar.gz |
MDEV-19588 Wrong results from query, using left join.
This bug could happen when queries with nested outer joins were
executed employing join buffers. At such an execution if the method
JOIN_CACHE::join_records() is called when a join buffer has become
full no 'first_unmatched' field should be cleaned up in the JOIN_TAB
structure to which the join cache with this buffer is attached.
Diffstat (limited to 'sql/sql_join_cache.cc')
-rw-r--r-- | sql/sql_join_cache.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index 73ee2013811..909eeb84971 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -2150,7 +2150,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 |