summaryrefslogtreecommitdiff
path: root/mysql-test/main/win.result
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-20 10:26:49 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-20 10:41:32 +0200
commit514b305dfb2839c619a623bbdae5f21cf0077672 (patch)
tree2f9700f05ccf0ddc7e46a547d9a191404e8dbbd7 /mysql-test/main/win.result
parentde51acd03730311505677eb7212756e7126183b3 (diff)
parent117291db8b35ddb4cd8c89ee4d8de888160b7163 (diff)
downloadmariadb-git-514b305dfb2839c619a623bbdae5f21cf0077672.tar.gz
Merge 10.3 into 10.4
The MDEV-17262 commit 26432e49d37a37d09b862bb49a021e44bdf4789c was skipped. In Galera 4, the implementation would seem to require changes to the streaming replication. In the tests archive.rnd_pos main.profiling, disable_ps_protocol for SHOW STATUS and SHOW PROFILE commands until MDEV-18974 has been fixed.
Diffstat (limited to 'mysql-test/main/win.result')
-rw-r--r--mysql-test/main/win.result17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result
index 279404968bf..2cc342a0cab 100644
--- a/mysql-test/main/win.result
+++ b/mysql-test/main/win.result
@@ -3489,6 +3489,23 @@ ifnull(max(n1) over (partition by n1),'aaa')
drop table t1;
drop view v1;
#
+# MDEV-18431: Select max + row_number giving incorrect result
+#
+create table t1 (id int, v int);
+insert into t1 values (1, 1), (1,2), (1,3), (2, 1), (2, 2);
+select e.id,
+(select max(t1.v) from t1 where t1.id=e.id) as a,
+row_number() over (partition by e.id order by e.v) as b,
+(select max(t1.v) from t1 where t1.id=e.id) + (row_number() over (partition by e.id order by e.v)) as sum_a_b
+from t1 e;
+id a b sum_a_b
+1 3 1 4
+1 3 2 5
+1 3 3 6
+2 2 1 3
+2 2 2 4
+drop table t1;
+#
# End of 10.2 tests
#
#