diff options
author | Igor Babaev <igor@askmonty.org> | 2011-11-16 06:11:25 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-11-16 06:11:25 -0800 |
commit | c05e5b9c65f76ba2d3a6844add88c03076b2cb5d (patch) | |
tree | a049c4f49ccef3dd4266690f836764c0e5ed2650 /sql/opt_subselect.cc | |
parent | 4d358f48c9b6b053dd6e0819130ce04794c33d52 (diff) | |
download | mariadb-git-c05e5b9c65f76ba2d3a6844add88c03076b2cb5d.tar.gz |
Fixed LP bug #887479.
The function setup_semijoin_dups_elimination erroneously assumed
that if join_cache_level is set to 3 or 4 then the type of the
access to a table cannot be JT_REF or JT_EQ_REF. This could lead
to wrong query result sets.
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 56815a624e2..a954811bdfa 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -3921,7 +3921,7 @@ int setup_semijoin_dups_elimination(JOIN *join, ulonglong options, if (j != join->const_tables && js_tab->use_quick != 2 && j <= no_jbuf_after && ((js_tab->type == JT_ALL && join_cache_level != 0) || - (join_cache_level > 4 && (tab->type == JT_REF || + (join_cache_level > 2 && (tab->type == JT_REF || tab->type == JT_EQ_REF)))) { /* Looks like we'll be using join buffer */ |