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.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test
index 08c894add0a..56e7b4baf8c 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -2730,6 +2730,16 @@ SELECT i, LAST_VALUE(COUNT(i)) OVER (PARTITION BY i ORDER BY j) FROM t1 GROUP BY
DROP TABLE t1;
--echo #
+--echo # MDEV-15208: server crashed, when using ORDER BY with window function and UNION
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(1),(1),(1),(1),(2),(2),(2),(2),(2),(2);
+--error ER_AGGREGATE_ORDER_FOR_UNION
+SELECT 1 UNION SELECT a FROM t1 ORDER BY (row_number() over ());
+DROP TABLE t1;
+
+--echo #
--echo # End of 10.2 tests
--echo #