diff options
author | unknown <mskold@mysql.com> | 2005-04-21 09:27:20 +0200 |
---|---|---|
committer | unknown <mskold@mysql.com> | 2005-04-21 09:27:20 +0200 |
commit | 7f0f4c5875a1b62ecf5467253c1a038c88625ecd (patch) | |
tree | 5c28702630ec074f170d604b82c00325bd0b8c11 /mysql-test/r | |
parent | 8d683973339d7d53977433fbd6a55038e6763e71 (diff) | |
parent | ecf7f30b301bca1bab88947b252ea7c58c122799 (diff) | |
download | mariadb-git-7f0f4c5875a1b62ecf5467253c1a038c88625ecd.tar.gz |
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/olap.result | 13 | ||||
-rw-r--r-- | mysql-test/r/type_timestamp.result | 47 |
2 files changed, 60 insertions, 0 deletions
diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result index 6500edf478f..341d51033f2 100644 --- a/mysql-test/r/olap.result +++ b/mysql-test/r/olap.result @@ -392,3 +392,16 @@ SELECT SQL_CALC_FOUND_ROWS a, SUM(b) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1; a SUM(b) 1 4 DROP TABLE t1; +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; +a m +1 1 +2 2 +NULL 3 +SELECT * FROM ( SELECT a, SUM(a) m FROM t1 GROUP BY a WITH ROLLUP ) t2; +a m +1 1 +2 2 +NULL 3 +DROP TABLE t1; diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index 6c46d308e7e..c0396e4640d 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -432,3 +432,50 @@ t1 CREATE TABLE "t1" ( ) set sql_mode=''; drop table t1; +create table t1 (a int auto_increment primary key, b int, c timestamp); +insert into t1 (a, b, c) values (1, 0, '2001-01-01 01:01:01'), +(2, 0, '2002-02-02 02:02:02'), (3, 0, '2003-03-03 03:03:03'); +select * from t1; +a b c +1 0 2001-01-01 01:01:01 +2 0 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +update t1 set b = 2, c = c where a = 2; +select * from t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +insert into t1 (a) values (4); +select * from t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +4 NULL 2001-09-09 04:46:59 +update t1 set c = '2004-04-04 04:04:04' where a = 4; +select * from t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +4 NULL 2004-04-04 04:04:04 +insert into t1 (a) values (3), (5) on duplicate key update b = 3, c = c; +select * from t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 3 2003-03-03 03:03:03 +4 NULL 2004-04-04 04:04:04 +5 NULL 2001-09-09 04:46:59 +insert into t1 (a, c) values (4, '2004-04-04 00:00:00'), +(6, '2006-06-06 06:06:06') on duplicate key update b = 4; +select * from t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 3 2003-03-03 03:03:03 +4 4 2001-09-09 04:46:59 +5 NULL 2001-09-09 04:46:59 +6 NULL 2006-06-06 06:06:06 +drop table t1; |