summaryrefslogtreecommitdiff
path: root/mysql-test/main/win_percentile.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/win_percentile.result')
-rw-r--r--mysql-test/main/win_percentile.result18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/main/win_percentile.result b/mysql-test/main/win_percentile.result
index f46fad80d16..6ae18488697 100644
--- a/mysql-test/main/win_percentile.result
+++ b/mysql-test/main/win_percentile.result
@@ -348,3 +348,21 @@ MEDIAN(`a2`) OVER (PARTITION BY `pk`)
FROM t1;
MEDIAN(`a1`) OVER () MEDIAN(`a2`) OVER (PARTITION BY `pk`)
DROP TABLE t1;
+#
+# MDEV-17137: Syntax errors with VIEW using MEDIAN
+#
+CREATE TABLE t1(val int);
+INSERT INTO t1 VALUES (1), (2), (3);
+CREATE VIEW v1 AS SELECT MEDIAN(val) OVER() FROM t1;
+select * from v1;
+MEDIAN(val) OVER()
+2.0000000000
+2.0000000000
+2.0000000000
+select median(val) OVER () FROM t1;
+median(val) OVER ()
+2.0000000000
+2.0000000000
+2.0000000000
+drop table t1;
+drop view v1;