# Check what happens when one attempts to use window function without OVER clause
#
create table t1 (a int, b int);
insert into t1 values (1,1),(2,2);
select row_number() from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from t1' at line 1
select rank() from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from t1' at line 1
drop table t1;
#
# Check if basic window functions work
#
create table t1(a int, b int, x char(32));
create table t1(a int, b int, x char(32));
insert into t1 values (2, 10, 'xx');
insert into t1 values (2, 10, 'xx');
insert into t1 values (2, 10, 'zz');
insert into t1 values (2, 10, 'zz');
...
@@ -39,3 +52,34 @@ pk a b row_number() over (order by a) row_number() over (order by b)
...
@@ -39,3 +52,34 @@ pk a b row_number() over (order by a) row_number() over (order by b)