summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-01-15 01:05:00 -0800
committerunknown <igor@rurik.mysql.com>2005-01-15 01:05:00 -0800
commit16f3170e7352b06a8b142bfef89bbcc383c2a676 (patch)
tree3adb20484b260235a7782a6a75a8fc120a8e69e3 /mysql-test
parent6f70a1d90931f34adb3bdc8b15e20b768af4f357 (diff)
downloadmariadb-git-16f3170e7352b06a8b142bfef89bbcc383c2a676.tar.gz
func_gconcat.result, func_gconcat.test:
Added a test case for bug #7769. item_sum.h: Fixed bug #7769: a crash for queries with group_concat and having when the query table was empty. The bug was due an unsafe dereferencing. sql/item_sum.h: Fixed bug #7769: a crash for queries with group_concat and having when the query table was empty. The bug was due an unsafe dereferencing. mysql-test/t/func_gconcat.test: Added a test case for bug #7769. mysql-test/r/func_gconcat.result: Added a test case for bug #7769.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_gconcat.result5
-rw-r--r--mysql-test/t/func_gconcat.test7
2 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index aa202823c77..390b33fdddc 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -457,3 +457,8 @@ group_concat(distinct b order by b)
Warnings:
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
drop table t1;
+CREATE TABLE t1 (id int);
+SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
+gc
+NULL
+DROP TABLE t1;
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index e0737a42221..6a91a7ac9c7 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -277,3 +277,10 @@ select group_concat(b order by b) from t1 group by a;
select group_concat(distinct b order by b) from t1 group by a;
drop table t1;
+
+#
+# bug #7769: group_concat returning null is checked in having
+#
+CREATE TABLE t1 (id int);
+SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
+DROP TABLE t1;