summaryrefslogtreecommitdiff
path: root/mysql-test/main/having_cond_pushdown.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/having_cond_pushdown.result')
-rw-r--r--mysql-test/main/having_cond_pushdown.result46
1 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/main/having_cond_pushdown.result b/mysql-test/main/having_cond_pushdown.result
index 9b124296e3d..ad8befb29d5 100644
--- a/mysql-test/main/having_cond_pushdown.result
+++ b/mysql-test/main/having_cond_pushdown.result
@@ -4924,3 +4924,49 @@ SELECT a FROM t1 GROUP BY a HAVING a = ( SELECT MIN(c) FROM t2 );
a
2
DROP TABLE t1,t2;
+#
+# MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order or Assertion `fixed == 1'
+#
+CREATE TABLE t1 (i int NOT NULL);
+SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL);
+i
+SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL AND 'x' = 0);
+i
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'x'
+SELECT * FROM t1 GROUP BY i HAVING i='1' IN ( i IS NULL AND 'x' = 0);
+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