summaryrefslogtreecommitdiff
path: root/mysql-test/r/win.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/win.result')
-rw-r--r--mysql-test/r/win.result26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result
index 3023a86eaad..dd74c5c77fd 100644
--- a/mysql-test/r/win.result
+++ b/mysql-test/r/win.result
@@ -3866,5 +3866,31 @@ NULL
DROP VIEW v1;
DROP TABLE t1,t2;
#
+# MDEV-25032 Window functions without column references get removed from ORDER BY
+#
+create table t1 (id int, score double);
+insert into t1 values
+(1, 5),
+(1, 6),
+(1, 6),
+(1, 6),
+(1, 7),
+(1, 8.1),
+(1, 9),
+(1, 10);
+select id, row_number() over () rn
+from t1
+order by rn desc;
+id rn
+1 8
+1 7
+1 6
+1 5
+1 4
+1 3
+1 2
+1 1
+drop table t1;
+#
# End of 10.2 tests
#