summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-05-15 13:38:01 +0300
committerMonty <monty@mariadb.org>2018-05-15 13:51:03 +0300
commit8a9048bcf3f3ef520a9c4654e2e21516c459e4fd (patch)
tree6b40fadfb22f0447e1aecb35ebc526cb023adce9 /mysql-test
parente7fc8cd683535c89556abaa6ad13873a40fde6a8 (diff)
downloadmariadb-git-8a9048bcf3f3ef520a9c4654e2e21516c459e4fd.tar.gz
MDEV-16170 Server crashes in Item_null_result::type_handler on SELECT with ROLLUP
Problem was that I in a previous patch enabled ifdef:ed code intended for 10.3 but that never worked. Reverted to original code
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/main/group_by.result11
-rw-r--r--mysql-test/main/group_by.test9
2 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/main/group_by.result b/mysql-test/main/group_by.result
index 62c659dd933..6f1887290c0 100644
--- a/mysql-test/main/group_by.result
+++ b/mysql-test/main/group_by.result
@@ -2832,3 +2832,14 @@ select distinct 1 from t1 group by a,b with rollup limit 1;
1
1
drop table t1;
+#
+# MDEV-16170
+# Server crashes in Item_null_result::type_handler on SELECT with ROLLUP
+#
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('2032-10-08');
+SELECT d != '2023-03-04' AS f, COUNT(*) FROM t1 GROUP BY d WITH ROLLUP;
+f COUNT(*)
+1 1
+NULL 1
+DROP TABLE t1;
diff --git a/mysql-test/main/group_by.test b/mysql-test/main/group_by.test
index 275939df5c5..5574a6654cf 100644
--- a/mysql-test/main/group_by.test
+++ b/mysql-test/main/group_by.test
@@ -1948,3 +1948,12 @@ insert into t1 values(-126,7),(1,1),(0,0),(-1,1),(351,65534);
select distinct 1 from t1 group by a,b with rollup limit 1;
drop table t1;
+--echo #
+--echo # MDEV-16170
+--echo # Server crashes in Item_null_result::type_handler on SELECT with ROLLUP
+--echo #
+
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('2032-10-08');
+SELECT d != '2023-03-04' AS f, COUNT(*) FROM t1 GROUP BY d WITH ROLLUP;
+DROP TABLE t1;