1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Create a default frame bound when no frame is specified.

This commit is contained in:
Vicențiu Ciorbaru
2016-03-07 12:30:04 +02:00
parent 974e65d368
commit 42ededf4ad

View File

@ -752,6 +752,18 @@ public:
Frame_cursor *get_frame_cursor(Window_frame *frame, bool is_top_bound)
{
// TODO-cvicentiu When a frame is not specified, which is the frame type
// that we will use?
// Postgres uses RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.
// For now we use UNBOUNDED FOLLOWING and UNBOUNDED PRECEDING.
if (!frame)
{
if (is_top_bound)
return new Frame_unbounded_preceding;
else
return new Frame_unbounded_following;
}
Window_frame_bound *bound= is_top_bound? frame->top_bound :
frame->bottom_bound;