summaryrefslogtreecommitdiff
path: root/mysql-test/r/olap.result
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-05-18 11:06:34 -0700
committerunknown <jimw@mysql.com>2005-05-18 11:06:34 -0700
commitf8a20dbeb6d53fc5d993e088c245e4f2f9b085c5 (patch)
tree384afb929b09dd50f92ab7de3d46902df3cb3e4e /mysql-test/r/olap.result
parent6f7bccd1aca31045e2678159e2e931d2e94f54dd (diff)
parentd104149caf5d272a8495e4bd55ec9eaf3015b408 (diff)
downloadmariadb-git-f8a20dbeb6d53fc5d993e088c245e4f2f9b085c5.tar.gz
Resolve merge from 4.1
BitKeeper/etc/logging_ok: auto-union configure.in: Auto merged myisam/mi_check.c: Auto merged mysql-test/mysql-test-run.sh: Auto merged client/mysqldump.c: Resolve merge mysql-test/r/myisam.result: Resolve merge mysql-test/r/mysqldump.result: Resolve merge mysql-test/r/olap.result: Resolve merge mysql-test/r/subselect.result: Resolve merge mysql-test/t/myisam.test: Resolve merge mysql-test/t/mysqldump.test: Resolve merge mysql-test/t/olap.test: Resolve merge mysql-test/t/range.test: Resolve merge mysql-test/t/subselect.test: Resolve merge ndb/src/common/util/version.c: Resolve merge ndb/src/ndbapi/ndberror.c: Resolve merge sql/item.cc: Resolve merge sql/item_strfunc.h: Resolve merge sql/sql_select.cc: Resolve merge sql/sql_yacc.yy: Resolve merge
Diffstat (limited to 'mysql-test/r/olap.result')
-rw-r--r--mysql-test/r/olap.result33
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result
index 1d8830b7d5f..9411edcdc00 100644
--- a/mysql-test/r/olap.result
+++ b/mysql-test/r/olap.result
@@ -456,3 +456,36 @@ a m
NULL 3
DROP TABLE t1;
set div_precision_increment= @sav_dpi;
+CREATE TABLE t1 (a int(11));
+INSERT INTO t1 VALUES (1),(2);
+SELECT a, SUM(a), SUM(a)+1 FROM (SELECT a FROM t1 UNION select 2) d
+GROUP BY a;
+a SUM(a) SUM(a)+1
+1 1 2
+2 2 3
+SELECT a, SUM(a), SUM(a)+1 FROM (SELECT a FROM t1 UNION select 2) d
+GROUP BY a WITH ROLLUP;
+a SUM(a) SUM(a)+1
+1 1 2
+2 2 3
+NULL 3 4
+SELECT a, SUM(a), SUM(a)+1 FROM (SELECT 1 a UNION select 2) d
+GROUP BY a;
+a SUM(a) SUM(a)+1
+1 1 2
+2 2 3
+SELECT a, SUM(a), SUM(a)+1 FROM (SELECT 1 a UNION select 2) d
+GROUP BY a WITH ROLLUP;
+a SUM(a) SUM(a)+1
+1 1 2
+2 2 3
+NULL 3 4
+SELECT a, SUM(a), SUM(a)+1, CONCAT(SUM(a),'x'), SUM(a)+SUM(a), SUM(a)
+FROM (SELECT 1 a, 2 b UNION SELECT 2,3 UNION SELECT 5,6 ) d
+GROUP BY a WITH ROLLUP;
+a SUM(a) SUM(a)+1 CONCAT(SUM(a),'x') SUM(a)+SUM(a) SUM(a)
+1 1 2 1x 2 1
+2 2 3 2x 4 2
+5 5 6 5x 10 5
+NULL 8 9 8x 16 8
+DROP TABLE t1;