summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-01-07 07:44:37 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-01-07 07:44:37 +0200
commite99ba4ba514e57456929d2b1dd12159a6fa22c92 (patch)
tree8f4ea22b7f3fa41f3ebbecee976d999a3340b7cc
parentfd899b3bbd2c7107f708ed46ba3798c48e2cfadd (diff)
parent1adc559370cc53ca69e225739a942287eba1b974 (diff)
downloadmariadb-git-e99ba4ba514e57456929d2b1dd12159a6fa22c92.tar.gz
Merge 10.1 into 10.2
-rw-r--r--mysql-test/r/group_by.result6
-rw-r--r--mysql-test/t/group_by.test2
2 files changed, 4 insertions, 4 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 23091d4647c..cbce6340c47 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -2830,16 +2830,16 @@ 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);
+INSERT INTO t1 values (1, 100), (2, 200), (3, 100), (4, 200), (5, 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
+201 3
SELECT b+1 AS x, COUNT(DISTINCT a) AS y FROM t1 GROUP BY x ORDER BY y;
x y
101 2
-201 2
+201 3
drop view v1;
drop table t1;
#
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index 9e24238b301..0436cd16e7c 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -1950,7 +1950,7 @@ drop table t1;
--echo #
CREATE TABLE t1(a int, b int);
-INSERT INTO t1 values (1, 100), (2, 200), (3, 100), (4, 200);
+INSERT INTO t1 values (1, 100), (2, 200), (3, 100), (4, 200), (5, 200);
create view v1 as select a, b+1 as x from t1;