summaryrefslogtreecommitdiff
path: root/mysql-test/main/win.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/win.test')
-rw-r--r--mysql-test/main/win.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test
index d8065e15fee..0bdfe48a82b 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -2522,6 +2522,26 @@ DROP VIEW v1;
DROP TABLE t1,t2;
--echo #
+--echo # MDEV-25032 Window functions without column references get removed from ORDER BY
+--echo #
+
+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;
+
+drop table t1;
+
+--echo #
--echo # End of 10.2 tests
--echo #