summaryrefslogtreecommitdiff
path: root/mysql-test/t/derived.test
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2005-02-14 02:06:21 +0200
committerbell@sanja.is.com.ua <>2005-02-14 02:06:21 +0200
commit2d3076b69dd48416cc103837da19b40862cf878d (patch)
tree4000a0d8fc719b79d7ee8435de7d980605d7b717 /mysql-test/t/derived.test
parent961d8b0ebf427ff4a3a4d2f32c06579198642303 (diff)
downloadmariadb-git-2d3076b69dd48416cc103837da19b40862cf878d.tar.gz
removed wrong distinct UNION detection (BUG#6565)
Diffstat (limited to 'mysql-test/t/derived.test')
-rw-r--r--mysql-test/t/derived.test12
1 files changed, 12 insertions, 0 deletions
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;