summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect_no_scache.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/subselect_no_scache.result')
-rw-r--r--mysql-test/r/subselect_no_scache.result17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index f648385f67a..6fd21f8d0b0 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -6644,6 +6644,23 @@ a ( 3, 3 ) NOT IN ( SELECT NULL, NULL )
set optimizer_switch=@mdev367_optimizer_switch;
DROP TABLE t1;
#
+# MDEV-521 single value subselect transformation problem
+#
+CREATE TABLE t1 (f1 char(2), PRIMARY KEY (f1)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('u1'),('u2');
+SELECT a.* FROM t1 a WHERE ( SELECT EXISTS ( SELECT 1 FROM t1 b WHERE b.f1 = a.f1 ) );
+f1
+u1
+u2
+FLUSH TABLES;
+SELECT a.* FROM t1 a WHERE ( SELECT EXISTS ( SELECT 1 FROM t1 b WHERE b.f1 = a.f1 ) );
+f1
+u1
+u2
+DROP TABLE t1;
+# return optimizer switch changed in the beginning of this test
+set optimizer_switch=@subselect_tmp;
+#
# lp:944706 Query with impossible or constant subquery in WHERE or HAVING is not
# precomputed and thus not part of optimization
#