summaryrefslogtreecommitdiff
path: root/mysql-test/main/subselect_no_exists_to_in.result
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-03-19 13:06:31 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-03-19 13:09:21 +0200
commitbe881ec4572b1cecd497436c5db471a83b6ae728 (patch)
tree966fef6744a55d6b0decd0ccee14d89774734c07 /mysql-test/main/subselect_no_exists_to_in.result
parent190a8312f598fc4892331225104297f6288f23ac (diff)
parent550cf13eb3e8a25826a0fa67935fc28ee7adb0c8 (diff)
downloadmariadb-git-be881ec4572b1cecd497436c5db471a83b6ae728.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'mysql-test/main/subselect_no_exists_to_in.result')
-rw-r--r--mysql-test/main/subselect_no_exists_to_in.result38
1 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/main/subselect_no_exists_to_in.result b/mysql-test/main/subselect_no_exists_to_in.result
index 1436f98d9f8..70add4d1740 100644
--- a/mysql-test/main/subselect_no_exists_to_in.result
+++ b/mysql-test/main/subselect_no_exists_to_in.result
@@ -7342,6 +7342,44 @@ WHERE (t2.i, t2.pk) NOT IN ( SELECT t3.i, t3.i FROM t t3, t t4 ) AND t1.c = 'foo
pk i c pk i c
1 10 foo 1 10 foo
DROP TABLE t;
+#
+# MDEV-25002: Outer reference in ON clause of subselect
+#
+create table t1 (
+pk int primary key,
+a int
+) engine=myisam;
+insert into t1 values (1,1), (2,2);
+create table t2 (
+pk int primary key,
+b int
+) engine=myisam;
+insert into t2 values (1,1), (2,3);
+create table t3 (a int);
+insert into t3 values (1),(2);
+select a,
+(select count(*) from t1, t2
+where t2.pk=t3.a and t1.pk=1) as sq
+from t3;
+a sq
+1 1
+2 1
+select a,
+(select count(*) from t1 join t2 on t2.pk=t3.a
+where t1.pk=1) as sq
+from t3;
+a sq
+1 1
+2 1
+select a from t3
+where a in (select t2.b from t1,t2 where t2.pk=t3.a and t1.pk=1);
+a
+1
+select a from t3
+where a in (select t2.b from t1 join t2 on t2.pk=t3.a where t1.pk=1);
+a
+1
+drop table t1,t2,t3;
# End of 10.2 tests
#
# Start of 10.4 tests