diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2016-09-21 16:45:36 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2016-09-24 15:12:34 +0200 |
commit | 872c0b4225150e909f44805bbbe645188a03aff8 (patch) | |
tree | bfbe79afb528c9e62d10dbb5ac1311bd274cefad /sql/item_windowfunc.h | |
parent | 74fa10645e6ea8688cff2b2d41a044f1b4442e47 (diff) | |
download | mariadb-git-872c0b4225150e909f44805bbbe645188a03aff8.tar.gz |
Allow first/last value functions to have frame definitions
Add a test case to check this behavior.
Diffstat (limited to 'sql/item_windowfunc.h')
-rw-r--r-- | sql/item_windowfunc.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h index ba5955084e2..cf484e3129d 100644 --- a/sql/item_windowfunc.h +++ b/sql/item_windowfunc.h @@ -657,10 +657,19 @@ public: case Item_sum::PERCENT_RANK_FUNC: case Item_sum::CUME_DIST_FUNC: case Item_sum::NTILE_FUNC: + return true; + default: + return false; + } + } + + bool requires_special_cursors() const + { + switch (window_func()->sum_func()) { case Item_sum::FIRST_VALUE_FUNC: case Item_sum::LAST_VALUE_FUNC: return true; - default: + default: return false; } } |