diff options
author | Igor Babaev <igor@askmonty.org> | 2011-05-29 11:09:05 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-05-29 11:09:05 -0700 |
commit | 37f3a801f30548cbcb636de8116a7fd5954dcd9c (patch) | |
tree | 76b0fb02787ca1b27a5c671155495747c79d4a32 /mysql-test/r/innodb_icp.result | |
parent | 061060eac0351ee35267bae085cc637686e21d6c (diff) | |
download | mariadb-git-37f3a801f30548cbcb636de8116a7fd5954dcd9c.tar.gz |
Backported the test case for bug 52605.
Diffstat (limited to 'mysql-test/r/innodb_icp.result')
-rw-r--r-- | mysql-test/r/innodb_icp.result | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result index 8937a9761ff..f604deb71c4 100644 --- a/mysql-test/r/innodb_icp.result +++ b/mysql-test/r/innodb_icp.result @@ -377,6 +377,39 @@ a b 5 5 DROP TABLE t1, t2; # +# Bug#52605 - "Adding LIMIT 1 clause to query with complex range +# predicate causes wrong results" +# +CREATE TABLE t1 ( +pk INT NOT NULL, +c1 INT, +PRIMARY KEY (pk), +KEY k1 (c1) +); +INSERT INTO t1 VALUES (1,NULL); +INSERT INTO t1 VALUES (2,6); +INSERT INTO t1 VALUES (3,NULL); +INSERT INTO t1 VALUES (4,6); +INSERT INTO t1 VALUES (5,NULL); +INSERT INTO t1 VALUES (6,NULL); +INSERT INTO t1 VALUES (7,9); +INSERT INTO t1 VALUES (8,0); +SELECT pk, c1 +FROM t1 +WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240 +ORDER BY c1 +LIMIT 1; +pk c1 +4 6 +EXPLAIN SELECT pk, c1 +FROM t1 +WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240 +ORDER BY c1 +LIMIT 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY,k1 k1 5 NULL 3 Using where; Using index +DROP TABLE t1; +# # Bug#59259 "Incorrect rows returned for a correlated subquery # when ICP is on" # |