summaryrefslogtreecommitdiff
path: root/mysql-test/main/group_by.result
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-01-03 15:05:50 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-01-03 15:05:50 +0100
commit9d036f840ad5925edac419c0cb6ce838ad0f3a2f (patch)
tree83ba4380b935ae385c83acad6ba2781940c42fe8 /mysql-test/main/group_by.result
parent2cff807d3f2149d17e776fbddb0fc9e23fa64e1b (diff)
parent7753a290645ca4af8b11f2fff1f47c3a64d45732 (diff)
downloadmariadb-git-9d036f840ad5925edac419c0cb6ce838ad0f3a2f.tar.gz
Merge branch '10.3' into 10.4
Diffstat (limited to 'mysql-test/main/group_by.result')
-rw-r--r--mysql-test/main/group_by.result16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/main/group_by.result b/mysql-test/main/group_by.result
index d1b0898e6b2..d72836141ee 100644
--- a/mysql-test/main/group_by.result
+++ b/mysql-test/main/group_by.result
@@ -2835,6 +2835,22 @@ SELECT 1 IN ( SELECT COUNT( DISTINCT f2 ) FROM t1 WHERE f1 <= 4 );
0
drop table t1;
#
+# MDEV-20922: Adding an order by changes the query results
+#
+CREATE TABLE t1(a int, b int);
+INSERT INTO t1 values (1, 100), (2, 200), (3, 100), (4, 200);
+create view v1 as select a, b+1 as x from t1;
+SELECT x, COUNT(DISTINCT a) AS y FROM v1 GROUP BY x ORDER BY y;
+x y
+101 2
+201 2
+SELECT b+1 AS x, COUNT(DISTINCT a) AS y FROM t1 GROUP BY x ORDER BY y;
+x y
+101 2
+201 2
+drop view v1;
+drop table t1;
+#
# MDEV-10694 - SIGFPE and/or huge memory allocation in maria_create with distinct/group by/ rollup
#
create table t1 (a int,b int) ;