diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-07-18 14:48:25 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-07-18 14:59:34 +0200 |
commit | 7c9d00e0bb1977e474dff28c2ce93f27599bbc10 (patch) | |
tree | 3e06d02eabb872519c97fbf8ab79927f6bbd00e4 /mysql-test/t/union.test | |
parent | 9b3360ea4417ed653d5c7eed29f4ef7e80618e43 (diff) | |
download | mariadb-git-7c9d00e0bb1977e474dff28c2ce93f27599bbc10.tar.gz |
Bug #24595639: INCORRECT BEHAVIOR IN QUERY WITH UNION AND GROUP BY
test case
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r-- | mysql-test/t/union.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index f4dc6a5d449..4a3c19b49ab 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -1370,3 +1370,18 @@ order by d; drop table t1; --echo End of 5.0 tests + +# +# Bug #24595639: INCORRECT BEHAVIOR IN QUERY WITH UNION AND GROUP BY +# +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; +select avg(f), (e , f) in (select e,b from t1 union select c,d from t2) as sub from t3 group by sub; +drop table t1,t2,t3; + +--echo End of 5.5 tests |