summaryrefslogtreecommitdiff
path: root/mysql-test/main/having_cond_pushdown.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2022-04-29 10:37:01 -0700
committerIgor Babaev <igor@askmonty.org>2022-04-29 10:37:36 -0700
commitc8228369f6dad5cfd17c5a9d9ea1c5c3ecd30fe7 (patch)
tree47e0b76d73f4f3ed6e2ee36f82e76aa4504c3ab9 /mysql-test/main/having_cond_pushdown.result
parent0beed9b5e933f0ff79b3bb346524f7a451d14e38 (diff)
downloadmariadb-git-c8228369f6dad5cfd17c5a9d9ea1c5c3ecd30fe7.tar.gz
MDEV-28080 Crash when using HAVING with NOT EXIST predicate in an equality
MDEV-28082 Crash when using HAVING with IS NULL predicate in an equality These bugs have been fixed by the patch for MDEV-26402. Only test cases are added.
Diffstat (limited to 'mysql-test/main/having_cond_pushdown.result')
-rw-r--r--mysql-test/main/having_cond_pushdown.result31
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/main/having_cond_pushdown.result b/mysql-test/main/having_cond_pushdown.result
index 9a9ed2b9213..ad8befb29d5 100644
--- a/mysql-test/main/having_cond_pushdown.result
+++ b/mysql-test/main/having_cond_pushdown.result
@@ -4939,3 +4939,34 @@ i
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x'
DROP TABLE t1;
+#
+# MDEV-28080: HAVING with NOT EXIST predicate in an equality
+# (fixed by the patch for MDEV-26402)
+#
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (b int);
+INSERT INTO t1 VALUES (0), (1), (1), (0);
+INSERT INTO t2 VALUES (3), (7);
+SELECT a FROM t1
+GROUP BY a HAVING a= (NOT EXISTS (SELECT b FROM t2 WHERE b = 1));
+a
+1
+SELECT a FROM t1
+GROUP BY a HAVING a= (NOT EXISTS (SELECT b FROM t2 WHERE b = 7));
+a
+0
+DROP TABLE t1, t2;
+#
+# MDEV-28082: HAVING with IS NULL predicate in an equality
+# (fixed by the patch for MDEV-26402)
+#
+CREATE TABLE t1 (a int, b int NOT NULL) ;
+INSERT INTO t1 VALUES (1,10), (0,11), (0,11), (1,10);
+SELECT a,b FROM t1 GROUP BY a HAVING a = (b IS NULL);
+a b
+0 11
+SELECT a,b FROM t1 GROUP BY a,b HAVING a = (b IS NULL);
+a b
+0 11
+DROP TABLE t1;
+End of 10.4 tests