mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
removed wrong distinct UNION detection (BUG#6565)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user