diff options
author | unknown <igor@rurik.mysql.com> | 2005-09-08 13:44:36 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-09-08 13:44:36 -0700 |
commit | 10349b118f29aee99657bcc33685b2e0a3016077 (patch) | |
tree | 690498b4771ed6a2c77ca478c63e76727f3e0052 /mysql-test/r/olap.result | |
parent | 5ae2ca2197a47e6853bf1d8526dbcd94b83a511a (diff) | |
parent | 17ec83fc01c1e888b22ecbdff03f263889ca114d (diff) | |
download | mariadb-git-10349b118f29aee99657bcc33685b2e0a3016077.tar.gz |
Manual merge
mysql-test/r/connect.result:
Auto merged
mysql-test/t/connect.test:
Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'mysql-test/r/olap.result')
-rw-r--r-- | mysql-test/r/olap.result | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result index 69871b2110b..b5b43cba3c7 100644 --- a/mysql-test/r/olap.result +++ b/mysql-test/r/olap.result @@ -555,6 +555,31 @@ IFNULL(a, 'TEST') COALESCE(b, 'TEST') 4 TEST TEST TEST DROP TABLE t1,t2; +CREATE TABLE t1 (a INT(10) NOT NULL, b INT(10) NOT NULL); +INSERT INTO t1 VALUES (1, 1); +INSERT INTO t1 VALUES (1, 2); +SELECT a, b, a AS c, COUNT(*) AS count FROM t1 GROUP BY a, b, c WITH ROLLUP; +a b c count +1 1 1 1 +1 1 NULL 1 +1 2 1 1 +1 2 NULL 1 +1 NULL NULL 2 +NULL NULL NULL 2 +DROP TABLE t1; +CREATE TABLE t1 (a int(11) NOT NULL); +INSERT INTO t1 VALUES (1),(2); +SELECT * FROM (SELECT a, a + 1, COUNT(*) FROM t1 GROUP BY a WITH ROLLUP) t; +a a + 1 COUNT(*) +1 2 1 +2 3 1 +NULL NULL 2 +SELECT * FROM (SELECT a, LENGTH(a), COUNT(*) FROM t1 GROUP BY a WITH ROLLUP) t; +a LENGTH(a) COUNT(*) +1 1 1 +2 1 1 +NULL NULL 2 +DROP TABLE t1; CREATE TABLE t1(id int, type char(1)); INSERT INTO t1 VALUES (1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"), @@ -577,15 +602,3 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using filesort DROP VIEW v1; DROP TABLE t1; -CREATE TABLE t1 (a INT(10) NOT NULL, b INT(10) NOT NULL); -INSERT INTO t1 VALUES (1, 1); -INSERT INTO t1 VALUES (1, 2); -SELECT a, b, a AS c, COUNT(*) AS count FROM t1 GROUP BY a, b, c WITH ROLLUP; -a b c count -1 1 1 1 -1 1 NULL 1 -1 2 1 1 -1 2 NULL 1 -1 NULL NULL 2 -NULL NULL NULL 2 -DROP TABLE t1; |