summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2016-03-14 17:49:23 +0300
committerSergei Petrunia <psergey@askmonty.org>2016-03-14 17:50:36 +0300
commite261c14456fdc92844a76688c08e1f4a6cc2c8bb (patch)
tree8a603c21e9aca08962aa89f2f35b55c41f9a0cd6 /mysql-test/r
parenta0c06ba1edb54c8c4705189c0455137a85658297 (diff)
downloadmariadb-git-e261c14456fdc92844a76688c08e1f4a6cc2c8bb.tar.gz
Add a testcase for RANGE-type frames and NULL values
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/win.result32
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result
index caa0ddbdcdb..3e085f5ead7 100644
--- a/mysql-test/r/win.result
+++ b/mysql-test/r/win.result
@@ -1086,3 +1086,35 @@ and 0.1 following)
1.220 2
3.330 1
drop table t1;
+#
+# RANGE-type frames and NULL values
+#
+create table t1 (
+pk int,
+a int,
+b int
+);
+insert into t1 values (1, NULL,1);
+insert into t1 values (2, NULL,1);
+insert into t1 values (3, NULL,1);
+insert into t1 values (4, 10 ,1);
+insert into t1 values (5, 11 ,1);
+insert into t1 values (6, 12 ,1);
+insert into t1 values (7, 13 ,1);
+insert into t1 values (8, 14 ,1);
+select
+pk, a,
+count(b) over (order by a
+range between 2 preceding
+and 2 following) as CNT
+from t1;
+pk a CNT
+1 NULL 3
+2 NULL 3
+3 NULL 3
+4 10 3
+5 11 4
+6 12 5
+7 13 4
+8 14 3
+drop table t1;