summaryrefslogtreecommitdiff
path: root/mysql-test/t/subselect4.test
diff options
context:
space:
mode:
authorunknown <timour@askmonty.org>2012-06-06 16:19:48 +0300
committerunknown <timour@askmonty.org>2012-06-06 16:19:48 +0300
commit8efc63ba5d32b77501226921ee503b9ae513a365 (patch)
treef87c5142ed7dc5ff72555b22ad19632fea527e10 /mysql-test/t/subselect4.test
parent7eaf0975ac4e1752399fdc06209739171350ccf4 (diff)
parentf1ab00891ad050711557c6cdc62b17fff896aed9 (diff)
downloadmariadb-git-8efc63ba5d32b77501226921ee503b9ae513a365.tar.gz
Merge
Diffstat (limited to 'mysql-test/t/subselect4.test')
-rw-r--r--mysql-test/t/subselect4.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/subselect4.test b/mysql-test/t/subselect4.test
index 8915cdd6500..e6ff625d3fe 100644
--- a/mysql-test/t/subselect4.test
+++ b/mysql-test/t/subselect4.test
@@ -1647,6 +1647,22 @@ CREATE TABLE t2 AS
DROP TABLE t2;
DROP TABLE t1;
+--echo #
+--echo # LP BUG#1000649 EXPLAIN shows incorrectly a non-correlated constant IN subquery is correlated
+--echo #
+
+create table ten (a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (a int, b int, c int);
+insert into t1 select a,a,a from ten;
+create table five (a int, b int, c int);
+insert into five select a,a,a from ten limit 5;
+
+set @@optimizer_switch='semijoin=on,in_to_exists=on,materialization=off';
+explain select * from t1 where 33 in (select b from five) or c > 11;
+
+drop table ten, t1, five;
+
set optimizer_switch=@subselect4_tmp;