summaryrefslogtreecommitdiff
path: root/mysql-test/t/olap.test
diff options
context:
space:
mode:
authorigor@rurik.mysql.com <>2005-04-19 19:00:02 -0700
committerigor@rurik.mysql.com <>2005-04-19 19:00:02 -0700
commit87ade2e6f7e1feaaa057a797c66e314d066b2d56 (patch)
tree7b0553d2fe54a30e9b5b67415514daa3243cc465 /mysql-test/t/olap.test
parentdee14fdd40a5049cded22c43819592d6ed9a89a1 (diff)
parent25c396628a5db12756e46e4e45708583bf1a0a81 (diff)
downloadmariadb-git-87ade2e6f7e1feaaa057a797c66e314d066b2d56.tar.gz
Merge of the fix for bug #9681 4.1->5.0
Diffstat (limited to 'mysql-test/t/olap.test')
-rw-r--r--mysql-test/t/olap.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/olap.test b/mysql-test/t/olap.test
index 6e83968a506..03b26e0b6c6 100644
--- a/mysql-test/t/olap.test
+++ b/mysql-test/t/olap.test
@@ -178,3 +178,16 @@ SELECT a, SUM(b) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1;
SELECT SQL_CALC_FOUND_ROWS a, SUM(b) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1;
DROP TABLE t1;
+
+#
+# Tests for bug #9681: ROLLUP in subquery for derived table wiht
+# a group by field declared as NOT NULL
+#
+
+CREATE TABLE t1 (a int(11) NOT NULL);
+INSERT INTO t1 VALUES (1),(2);
+
+SELECT a, SUM(a) m FROM t1 GROUP BY a WITH ROLLUP;
+SELECT * FROM ( SELECT a, SUM(a) m FROM t1 GROUP BY a WITH ROLLUP ) t2;
+
+DROP TABLE t1;