summaryrefslogtreecommitdiff
path: root/mysql-test/main/group_by.result
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-01-03 16:15:40 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-01-03 16:15:40 +0200
commitca8c3be47db39319ecdc915bd50f25b5d334c2b1 (patch)
treef49f621232546a95330267bf6746bdd5bf5fd976 /mysql-test/main/group_by.result
parent9949ab93939369fd4dacab859428c1c4effd5cca (diff)
parent9d036f840ad5925edac419c0cb6ce838ad0f3a2f (diff)
downloadmariadb-git-ca8c3be47db39319ecdc915bd50f25b5d334c2b1.tar.gz
Merge 10.4 into 10.5
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 3108f2f4e65..47873b09d90 100644
--- a/mysql-test/main/group_by.result
+++ b/mysql-test/main/group_by.result
@@ -2844,6 +2844,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) ;