summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-11-21 09:06:35 -0800
committerIgor Babaev <igor@askmonty.org>2011-11-21 09:06:35 -0800
commitb2e5a3f603a1b8d06af9ec6579749de836bd8f47 (patch)
tree41494af268a8f9b045d3fd88ccae49b20e01b4f4 /sql/opt_subselect.h
parent0693f4d9168eeee399f9d636c9ba81981e484daf (diff)
downloadmariadb-git-b2e5a3f603a1b8d06af9ec6579749de836bd8f47.tar.gz
Fixed LP bug #887496.
This bug in the function Loose_scan_opt::check_ref_access_part1 could lead to choosing an invalid execution plan employing a loose scan access to a semi-join table even in the cases when such access could not be used at all. This could result in wrong answers for some queries with IN subqueries.
Diffstat (limited to 'sql/opt_subselect.h')
-rw-r--r--sql/opt_subselect.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h
index 571fcbaa935..823b09a1f73 100644
--- a/sql/opt_subselect.h
+++ b/sql/opt_subselect.h
@@ -170,7 +170,7 @@ public:
PREV_BITS(ulonglong, s->emb_sj_nest->sj_in_exprs) && // (2)
(PREV_BITS(key_part_map, max_loose_keypart+1) & // (3)
(found_part | loose_scan_keyparts)) == // (3)
- (found_part | loose_scan_keyparts) && // (3)
+ PREV_BITS(key_part_map, max_loose_keypart+1) && // (3)
!key_uses_partial_cols(s->table, key))
{
/* Ok, can use the strategy */