diff options
author | unknown <bell@51.0.168.192.in-addr.arpa> | 2005-02-22 13:00:00 +0200 |
---|---|---|
committer | unknown <bell@51.0.168.192.in-addr.arpa> | 2005-02-22 13:00:00 +0200 |
commit | 56679769a849499f5a3dfc292b890d1f28e6e200 (patch) | |
tree | df27af458ad1de47523dfb02ef62349b8487cfa0 /mysql-test | |
parent | 14707d71c388375817b4ffb74df189bbe14a709d (diff) | |
parent | f048032c6843548ca6c04d78b2dd77ff5eddbe9e (diff) | |
download | mariadb-git-56679769a849499f5a3dfc292b890d1f28e6e200.tar.gz |
Merge 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-4.1
into 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-4.1
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/derived.result | 19 | ||||
-rw-r--r-- | mysql-test/t/derived.test | 12 |
2 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 61d745d0236..b4d9a921178 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -339,3 +339,22 @@ select distinct sum(b) from (select a,b from t1) y group by a; sum(b) 4 drop table t1; +create table t1(a int); +create table t2(a int); +create table t3(a int); +insert into t1 values(1),(1); +insert into t2 values(2),(2); +insert into t3 values(3),(3); +select * from t1 union distinct select * from t2 union all select * from t3; +a +1 +2 +3 +3 +select * from (select * from t1 union distinct select * from t2 union all select * from t3) X; +a +1 +2 +3 +3 +drop table t1, t2, t3; diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index 8b322746ed6..bd27e0654e0 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -224,3 +224,15 @@ select distinct sum(b) from t1 group by a; select distinct sum(b) from (select a,b from t1) y group by a; drop table t1; +# +# test of union subquery in the FROM clause with complex distinct/all (BUG#6565) +# +create table t1(a int); +create table t2(a int); +create table t3(a int); +insert into t1 values(1),(1); +insert into t2 values(2),(2); +insert into t3 values(3),(3); +select * from t1 union distinct select * from t2 union all select * from t3; +select * from (select * from t1 union distinct select * from t2 union all select * from t3) X; +drop table t1, t2, t3; |