summaryrefslogtreecommitdiff
path: root/mysql-test/r/union.result
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-08-25 10:25:48 +0200
committerSergei Golubchik <serg@mariadb.org>2017-08-25 10:25:48 +0200
commit27412877dbcf601676f4515a99b2abee1f19623b (patch)
tree2cb1a2e1a58ba10f2a96fcdec43f5ed77c326fd0 /mysql-test/r/union.result
parentf2033df6ac0f64664d9aad2d56fdd74f4bf9d666 (diff)
parenta544225d0a772bd4b67c96f5861ecc0ef7e69bba (diff)
downloadmariadb-git-27412877dbcf601676f4515a99b2abee1f19623b.tar.gz
Merge branch '10.2' into bb-10.2-ext
Diffstat (limited to 'mysql-test/r/union.result')
-rw-r--r--mysql-test/r/union.result18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 956703237a1..b193f032146 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -2077,6 +2077,24 @@ d
2016-06-04 00:00:00
drop table t1;
End of 5.0 tests
+create table t1 (a int, b int);
+insert into t1 values (1,1),(2,2),(3,3);
+create table t2 (c varchar(30), d varchar(30));
+insert into t1 values ('1','1'),('2','2'),('4','4');
+create table t3 (e int, f int);
+insert into t3 values (1,1),(2,2),(31,31),(32,32);
+select e,f, (e , f) in (select e,b from t1 union select c,d from t2) as sub from t3;
+e f sub
+1 1 1
+2 2 1
+31 31 0
+32 32 0
+select avg(f), (e , f) in (select e,b from t1 union select c,d from t2) as sub from t3 group by sub;
+avg(f) sub
+31.5000 0
+1.5000 1
+drop table t1,t2,t3;
+End of 5.5 tests
#
# WL#1763 Avoid creating temporary table in UNION ALL
#