summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2016-03-18 00:33:53 -0700
committerIgor Babaev <igor@askmonty.org>2016-03-18 00:33:53 -0700
commita197c6bb68d77a0ec73b28d1e6473022ea6b1ae0 (patch)
treea91588ab6a002b5ef7bedd006a6b23ee8957355c /mysql-test/r
parent761590dcd53162e7b73421eb6a61cd399f4dc70d (diff)
downloadmariadb-git-a197c6bb68d77a0ec73b28d1e6473022ea6b1ae0.tar.gz
Prohibit using window functions of some types with
window frames in full accordance with the SQL standard.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/win.result19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result
index e8f74fa2f59..ff5c161b9d5 100644
--- a/mysql-test/r/win.result
+++ b/mysql-test/r/win.result
@@ -451,6 +451,25 @@ count(*) over (w2 rows between 2 following and current row) as CNT
from t1
window w1 as (partition by c), w2 as (w1 order by pk);
ERROR HY000: Unacceptable combination of window frame bound specifications
+select
+pk, c,
+row_number() over (partition by c order by pk
+range between unbounded preceding and current row) as r
+from t1;
+ERROR HY000: Window frame is not allowed with 'row_number'
+select
+pk, c,
+rank() over w1 as r
+from t1
+window w1 as (partition by c order by pk
+rows between 2 preceding and 2 following);
+ERROR HY000: Window frame is not allowed with 'rank'
+select
+pk, c,
+dense_rank() over (partition by c order by pk
+rows between 1 preceding and 1 following) as r
+from t1;
+ERROR HY000: Window frame is not allowed with 'dense_rank'
drop table t0,t1;
#
# MDEV-9634: Window function produces incorrect value