summaryrefslogtreecommitdiff
path: root/mysql-test/main/union.result
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-07-15 10:17:15 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-15 10:17:15 +0300
commit9936cfd531a49b0ba124c4eb38a6099ec420c7fd (patch)
tree52e3c6dd19846b7ff0d895c31e78bc1e781ca780 /mysql-test/main/union.result
parenta7634281aa64a549d19cd20ead7e80d0267271ee (diff)
parent8a0944080c950349aaf7c81bc8f8c63b262f98eb (diff)
downloadmariadb-git-9936cfd531a49b0ba124c4eb38a6099ec420c7fd.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/main/union.result')
-rw-r--r--mysql-test/main/union.result29
1 files changed, 12 insertions, 17 deletions
diff --git a/mysql-test/main/union.result b/mysql-test/main/union.result
index e3a69f54949..ef3aed397ba 100644
--- a/mysql-test/main/union.result
+++ b/mysql-test/main/union.result
@@ -1794,8 +1794,7 @@ union
select 4
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
;
-foo
-1
+ERROR HY000: Expression #1 of ORDER BY contains aggregate function and applies to a UNION
prepare stmt1 from 'select 1 as foo
union
select 2
@@ -1805,12 +1804,7 @@ union
select 4
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
';
-execute stmt1;
-foo
-1
-execute stmt1;
-foo
-1
+ERROR HY000: Expression #1 of ORDER BY contains aggregate function and applies to a UNION
select 1 as foo
union
select 2
@@ -1820,8 +1814,7 @@ union
(select 4)
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
;
-foo
-1
+ERROR HY000: Expression #1 of ORDER BY contains aggregate function and applies to a UNION
prepare stmt1 from 'select 1 as foo
union
select 2
@@ -1831,13 +1824,7 @@ union
(select 4)
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
';
-execute stmt1;
-foo
-1
-execute stmt1;
-foo
-1
-deallocate prepare stmt1;
+ERROR HY000: Expression #1 of ORDER BY contains aggregate function and applies to a UNION
End of 5.1 tests
#
# mdev-5091: Asseirtion failure for UNION with ORDER BY
@@ -2336,6 +2323,14 @@ Warnings:
Note 1003 /* select#1 */ select 1 AS `1`,2 AS `2` union all /* select#2 */ select 1 AS `i`,count(0) AS `COUNT(*)` from `test`.`t2` where 0 group by 1 having 1
DROP TABLE t1,t2;
#
+# MDEV-10120: Wrong result of UNION .. ORDER BY GROUP_CONCAT()
+#
+CREATE TABLE t1 (a INT);
+INSERT t1 VALUES (1),(2),(3);
+(SELECT 1 AS a) UNION (SELECT a FROM t1 GROUP BY a) ORDER BY GROUP_CONCAT(a);
+ERROR HY000: Expression #1 of ORDER BY contains aggregate function and applies to a UNION
+DROP TABLE t1;
+#
# Start of 10.3 tests
#
#