From e51b015fc354ec40c8430d4f4ea6346bc9a8e07b Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Sat, 4 Feb 2017 21:51:40 -0800 Subject: Fixed bug mdev-11138. Supported usage of expressions with window functions in SELECTs without tables. --- mysql-test/r/win.result | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'mysql-test/r/win.result') diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result index 2a4f6408377..c84c98c6032 100644 --- a/mysql-test/r/win.result +++ b/mysql-test/r/win.result @@ -2521,3 +2521,27 @@ id rnk 2 2 drop view v1; drop table t1; +# +# MDEV-11138: window function in the query without tables +# +select row_number() over (); +row_number() over () +1 +select count(*) over (); +count(*) over () +1 +select sum(5) over (); +sum(5) over () +5 +select row_number() over (), sum(5) over (); +row_number() over () sum(5) over () +1 5 +select row_number() over (order by 2); +row_number() over (order by 2) +1 +select row_number() over (partition by 2); +row_number() over (partition by 2) +1 +select row_number() over (partition by 4 order by 1+2); +row_number() over (partition by 4 order by 1+2) +1 -- cgit v1.2.1