diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-12-18 11:07:08 +0200 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-12-18 11:07:08 +0200 |
commit | 82e026c1462dc2b5971bb83efffa5a82492dc1e7 (patch) | |
tree | cb036e8ee3dacc88a815cab2435a05809623ee7b /mysql-test/r/union.result | |
parent | 8aac47e2ccf70471c0296a32fa6aa433081c6984 (diff) | |
parent | 55d284d424c954888536f615731a61d039d80ac1 (diff) | |
download | mariadb-git-82e026c1462dc2b5971bb83efffa5a82492dc1e7.tar.gz |
Merge magare.gmz:/home/kgeorge/mysql/autopush/B19390-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B19390-5.1-opt
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/suite/rpl/r/rpl_trigger.result:
Auto merged
mysql-test/suite/rpl/t/rpl_trigger.test:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/log.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/unireg.cc:
Auto merged
mysql-test/r/union.result:
Merged bug 27848 to 5.1-opt
mysql-test/t/union.test:
Merged bug 27848 to 5.1-opt
sql/sql_yacc.yy:
Merged bug 27848 to 5.1-opt
Diffstat (limited to 'mysql-test/r/union.result')
-rw-r--r-- | mysql-test/r/union.result | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 6fc630ec33c..a8f538b6cc7 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -1445,4 +1445,55 @@ select @var; 1 (select 2) union (select 1 into @var); ERROR 42000: Result consisted of more than one row +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (10), (20); +CREATE TABLE t2 (b int); +INSERT INTO t2 VALUES (10), (50), (50); +SELECT a,1 FROM t1 +UNION +SELECT b, COUNT(*) FROM t2 GROUP BY b WITH ROLLUP +ORDER BY a; +a 1 +NULL 3 +10 1 +20 1 +50 2 +SELECT a,1 FROM t1 +UNION +SELECT b, COUNT(*) FROM t2 GROUP BY b WITH ROLLUP +ORDER BY a DESC; +a 1 +50 2 +20 1 +10 1 +NULL 3 +SELECT a,1 FROM t1 +UNION +SELECT b, COUNT(*) FROM t2 GROUP BY b WITH ROLLUP +ORDER BY a ASC LIMIT 3; +a 1 +NULL 3 +10 1 +20 1 +SELECT a,1 FROM t1 +UNION ALL +SELECT b, COUNT(*) FROM t2 GROUP BY b WITH ROLLUP +ORDER BY a DESC; +a 1 +50 2 +20 1 +10 1 +10 1 +NULL 3 +SELECT a,1 FROM t1 +UNION +(SELECT b, COUNT(*) FROM t2 GROUP BY b WITH ROLLUP ORDER BY a); +ERROR HY000: Incorrect usage of CUBE/ROLLUP and ORDER BY +SELECT a,1 FROM t1 +UNION ALL +SELECT b, COUNT(*) FROM t2 GROUP BY b WITH ROLLUP ORDER BY a +UNION +SELECT 1,1; +ERROR HY000: Incorrect usage of UNION and ORDER BY +DROP TABLE t1,t2; End of 5.0 tests |