diff options
| author | Igor Babaev <igor@askmonty.org> | 2012-01-28 01:12:45 -0800 |
|---|---|---|
| committer | Igor Babaev <igor@askmonty.org> | 2012-01-28 01:12:45 -0800 |
| commit | 5ca1dd8f0b22d6b5aea06c9ad32481498cb99d6e (patch) | |
| tree | 992f436bebfdbf5e8bd91ae6b783d70da0501ca7 /sql/sql_join_cache.cc | |
| parent | d25f6bb3eb061ecb9f03529aeafb88f8b10cdfb6 (diff) | |
| download | mariadb-git-5ca1dd8f0b22d6b5aea06c9ad32481498cb99d6e.tar.gz | |
Fixed LP bug #922971.
Applied the fix for bug #12546542 from the mysql-5.6 code line:
JOIN_CACHE::join_records forgot to reset JOIN_TAB::first_unmatched
in some cases.
Diffstat (limited to 'sql/sql_join_cache.cc')
| -rw-r--r-- | sql/sql_join_cache.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index af4b157ba90..2a8db8b4fd1 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -2109,16 +2109,6 @@ enum_nested_loop_state JOIN_CACHE::join_records(bool skip_last) if (rc != NESTED_LOOP_OK && rc != NESTED_LOOP_NO_MORE_ROWS) goto finish; } - if (outer_join_first_inner) - { - /* - All null complemented rows have been already generated for all - outer records from join buffer. Restore the state of the - first_unmatched values to 0 to avoid another null complementing. - */ - for (tab= join_tab->first_inner; tab <= join_tab->last_inner; tab++) - tab->first_unmatched= 0; - } if (skip_last) { @@ -2131,6 +2121,16 @@ enum_nested_loop_state JOIN_CACHE::join_records(bool skip_last) } finish: + if (outer_join_first_inner) + { + /* + All null complemented rows have been already generated for all + outer records from join buffer. Restore the state of the + first_unmatched values to 0 to avoid another null complementing. + */ + for (tab= join_tab->first_inner; tab <= join_tab->last_inner; tab++) + tab->first_unmatched= 0; + } restore_last_record(); reset(TRUE); DBUG_PRINT("exit", ("rc: %d", rc)); |
