summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-11-01 07:00:55 -0700
committerIgor Babaev <igor@askmonty.org>2011-11-01 07:00:55 -0700
commita70f7aa5fe0b05228aea5bf9673233d857524b0d (patch)
tree53f7e1eafa2d490add5166bf90281c65f1113187 /mysql-test/include
parent0efacfcfb24443bbd342e5c4447b166cb569438c (diff)
downloadmariadb-git-a70f7aa5fe0b05228aea5bf9673233d857524b0d.tar.gz
Backported the fix and the test case for bug 12822678 from the mysql-5.6 code line.
Fixed a bug in select_describe. Adjusted results for affected test cases.
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/icp_tests.inc26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/include/icp_tests.inc b/mysql-test/include/icp_tests.inc
index 28121251377..c219bf9cdc2 100644
--- a/mysql-test/include/icp_tests.inc
+++ b/mysql-test/include/icp_tests.inc
@@ -615,6 +615,32 @@ SELECT col999 FROM t1 WHERE col1000 = "3" AND col1003 <=> sysdate();
DROP TABLE t1;
--echo #
+--echo # BUG#12822678 - ICP WITH STRAIGHT_JOIN
+--echo #
+
+CREATE TABLE t1 (
+ i1 INTEGER NOT NULL,
+ d1 DOUBLE,
+ KEY k1 (d1)
+);
+INSERT INTO t1 VALUES (10,1), (17,NULL), (22,NULL);
+
+CREATE TABLE t2 (
+ pk INTEGER NOT NULL,
+ i1 INTEGER NOT NULL,
+ PRIMARY KEY (pk)
+);
+INSERT INTO t2 VALUES (4,1);
+
+EXPLAIN
+SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1
+ WHERE t2.pk <> t1.d1 AND t2.pk = 4;
+SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1
+ WHERE t2.pk <> t1.d1 AND t2.pk = 4;
+
+DROP TABLE t1, t2;
+
+--echo #
--echo # BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89
--echo #
CREATE TABLE t1 ( f11 int) ;