summaryrefslogtreecommitdiff
path: root/sql/sql_window.h
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2016-02-07 02:32:03 +0300
committerSergei Petrunia <psergey@askmonty.org>2016-02-07 02:32:03 +0300
commit32c7f333914c1218d975a2a4204ac506ee3b21eb (patch)
tree73582ffbdd4646167c6f86597313a245ceb1e4d5 /sql/sql_window.h
parent11112cea18d9ecb71957a0ae348ab2503ef2cdeb (diff)
downloadmariadb-git-10.2-window_simple.tar.gz
Fix parsing of Window Frame bounds10.2-window_simple
Diffstat (limited to 'sql/sql_window.h')
-rw-r--r--sql/sql_window.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/sql/sql_window.h b/sql/sql_window.h
index 144a9037aa9..551af3ac1ee 100644
--- a/sql/sql_window.h
+++ b/sql/sql_window.h
@@ -12,27 +12,41 @@
*/
+/*
+ Window frame bound. This is a parsed representation of this syntax:
+ (UNBOUNDED | unsigned_value) (PRECEDING | FOLLOWING)
+ CURRENT_ROW
+*/
+
class Window_frame_bound : public Sql_alloc
{
-
public:
-
enum Bound_precedence_type
{
PRECEDING,
FOLLOWING
};
+ /* Either PRECEDING or FOLLOWING */
Bound_precedence_type precedence_type;
+ /*
+ NULL - means CURRENT ROW
+ (Item*)1 - means "UNBOUNDED" (TODO switch to a named constant!)
+ other - is an unsigned_value (TODO: does the parser really check?)
+ */
Item *offset;
+
+ Window_frame_bound(enum Bound_precedence_type type_arg,
+ Item *offset_arg) :
+ precedence_type(type_arg), offset(offset_arg)
+ {}
};
class Window_frame : public Sql_alloc
{
-
public:
enum Frame_units