summaryrefslogtreecommitdiff
path: root/mysql-test/main/subselect.test
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-07-26 22:42:35 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-07-26 22:42:35 +0200
commitd97342b6f2cfdd55eb0f82b390ebc89c5997c382 (patch)
tree238dbb11c51a2352c99de198586b84f260b3aad9 /mysql-test/main/subselect.test
parent00a254cc069e77f2088f6fbf8c367f247cfdd0dc (diff)
parent32c6f40a6319d493e5270c72ac5d27dc99d1b242 (diff)
downloadmariadb-git-d97342b6f2cfdd55eb0f82b390ebc89c5997c382.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'mysql-test/main/subselect.test')
-rw-r--r--mysql-test/main/subselect.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/main/subselect.test b/mysql-test/main/subselect.test
index 189dde382dd..211ed5162a6 100644
--- a/mysql-test/main/subselect.test
+++ b/mysql-test/main/subselect.test
@@ -6119,6 +6119,30 @@ explain select * from t1 where (select max(b) from t2) = 10 and t1.a > 3;
drop table t1,t2;
+
+--echo #
+--echo # MDEV-19429: Wrong query result with EXISTS and LIMIT 0
+--echo #
+create table t10 (a int);
+insert into t10 values (1),(2),(3);
+create table t12 (a int);
+insert into t12 values (1),(2),(3);
+select * from t10 where exists (select * from t12 order by a limit 0);
+explain select * from t10 where exists (select * from t12 order by a limit 0);
+
+prepare stmt1 from "select * from t10 where exists (select * from t12 order by a limit ?)";
+
+set @l=1;
+execute stmt1 using @l;
+set @l=2;
+execute stmt1 using @l;
+set @l=0;
+execute stmt1 using @l;
+
+deallocate prepare stmt1;
+
+drop table t10, t12;
+
--echo End of 5.5 tests
--echo # End of 10.0 tests