summaryrefslogtreecommitdiff
path: root/mysql-test/include/icp_tests.inc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-10-29 15:36:24 -0700
committerIgor Babaev <igor@askmonty.org>2011-10-29 15:36:24 -0700
commit7bc6a83b027aeddbe1d84ceb6647928d5cfb3bca (patch)
treefac26c78c875d41b56489aa8f8f5a4811b0ab428 /mysql-test/include/icp_tests.inc
parenta8f5b5e866eb5f0cc9f8e01ed88cf56df93f8abf (diff)
downloadmariadb-git-7bc6a83b027aeddbe1d84ceb6647928d5cfb3bca.tar.gz
Backported the fix and the test case for bug #58816 from mysql-5.6 code line.
Diffstat (limited to 'mysql-test/include/icp_tests.inc')
-rw-r--r--mysql-test/include/icp_tests.inc25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/include/icp_tests.inc b/mysql-test/include/icp_tests.inc
index 53099eda5ae..c41fab88293 100644
--- a/mysql-test/include/icp_tests.inc
+++ b/mysql-test/include/icp_tests.inc
@@ -468,6 +468,31 @@ set optimizer_switch=@save_optimizer_switch;
DROP TABLE t1, t2;
--echo #
+--echo # Bug #58816 "Extra temporary duplicate rows in result set when
+--echo # switching ICP off"
+--echo #
+
+set @save_optimizer_switch= @@optimizer_switch;
+
+CREATE TABLE t1 (
+ pk INT NOT NULL,
+ c1 INT NOT NULL,
+ PRIMARY KEY (pk)
+);
+
+INSERT INTO t1 VALUES (1,9),(2,7),(3,6),(4,3),(5,1);
+
+EXPLAIN SELECT pk, c1 FROM t1 WHERE pk <> 3;
+
+SET SESSION optimizer_switch='index_condition_pushdown=off';
+
+SELECT pk, c1 FROM t1 WHERE pk <> 3;
+
+DROP TABLE t1;
+
+set optimizer_switch= @save_optimizer_switch;
+
+--echo #
--echo # BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89
--echo #
CREATE TABLE t1 ( f11 int) ;