summaryrefslogtreecommitdiff
path: root/mysql-test/r/olap.result
diff options
context:
space:
mode:
authorunknown <igor@olga.mysql.com>2007-04-29 18:32:59 -0700
committerunknown <igor@olga.mysql.com>2007-04-29 18:32:59 -0700
commit532f2e84160e14b8f1a9104ec673af778e8950a6 (patch)
tree4f41906a0d61ce1b1e7d1ceb6ce8830dfded7627 /mysql-test/r/olap.result
parentba967f5b43dd1bb0f303bdeee55aeb630ea829a7 (diff)
parentc004ad09444b8b3be367b6620aa4f0716684bdc3 (diff)
downloadmariadb-git-532f2e84160e14b8f1a9104ec673af778e8950a6.tar.gz
Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug24856 sql/item_func.h: Auto merged sql/sql_select.cc: Auto merged mysql-test/r/olap.result: Manual merge. mysql-test/t/olap.test: Manual merge.
Diffstat (limited to 'mysql-test/r/olap.result')
-rw-r--r--mysql-test/r/olap.result60
1 files changed, 60 insertions, 0 deletions
diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result
index 91cd15295c3..fe6253611e8 100644
--- a/mysql-test/r/olap.result
+++ b/mysql-test/r/olap.result
@@ -607,6 +607,66 @@ x a sum(b)
2006-07-01 NULL 11
NULL NULL 11
drop table t1;
+CREATE TABLE t1 (a int, b int);
+INSERT INTO t1
+VALUES (2,10),(3,30),(2,40),(1,10),(2,30),(1,20),(2,10);
+SELECT a, SUM(b) FROM t1 GROUP BY a WITH ROLLUP;
+a SUM(b)
+1 30
+2 90
+3 30
+NULL 150
+SELECT DISTINCT a, SUM(b) FROM t1 GROUP BY a WITH ROLLUP;
+a SUM(b)
+1 30
+2 90
+3 30
+NULL 150
+SELECT a, b, COUNT(*) FROM t1 GROUP BY a,b WITH ROLLUP;
+a b COUNT(*)
+1 10 1
+1 20 1
+1 NULL 2
+2 10 2
+2 30 1
+2 40 1
+2 NULL 4
+3 30 1
+3 NULL 1
+NULL NULL 7
+SELECT DISTINCT a, b, COUNT(*) FROM t1 GROUP BY a,b WITH ROLLUP;
+a b COUNT(*)
+1 10 1
+1 20 1
+1 NULL 2
+2 10 2
+2 30 1
+2 40 1
+2 NULL 4
+3 30 1
+3 NULL 1
+NULL NULL 7
+SELECT 'x', a, SUM(b) FROM t1 GROUP BY 1,2 WITH ROLLUP;
+x a SUM(b)
+x 1 30
+x 2 90
+x 3 30
+x NULL 150
+NULL NULL 150
+SELECT DISTINCT 'x', a, SUM(b) FROM t1 GROUP BY 1,2 WITH ROLLUP;
+x a SUM(b)
+x 1 30
+x 2 90
+x 3 30
+x NULL 150
+NULL NULL 150
+SELECT DISTINCT 'x', a, SUM(b) FROM t1 GROUP BY 1,2 WITH ROLLUP;
+x a SUM(b)
+x 1 30
+x 2 90
+x 3 30
+x NULL 150
+NULL NULL 150
CREATE TABLE t1(id int, type char(1));
INSERT INTO t1 VALUES
(1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"),