summaryrefslogtreecommitdiff
path: root/sql/sql_window.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2016-09-21 16:45:36 +0200
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2016-09-24 15:12:34 +0200
commit872c0b4225150e909f44805bbbe645188a03aff8 (patch)
treebfbe79afb528c9e62d10dbb5ac1311bd274cefad /sql/sql_window.cc
parent74fa10645e6ea8688cff2b2d41a044f1b4442e47 (diff)
downloadmariadb-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/sql_window.cc')
-rw-r--r--sql/sql_window.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_window.cc b/sql/sql_window.cc
index 92ff71fcf38..8ec2b24d45d 100644
--- a/sql/sql_window.cc
+++ b/sql/sql_window.cc
@@ -2147,7 +2147,8 @@ void get_window_functions_required_cursors(
functions can keep the default frame generating code, overwrite it or
add to it.
*/
- if (item_win_func->is_frame_prohibited())
+ if (item_win_func->is_frame_prohibited() ||
+ item_win_func->requires_special_cursors())
{
add_special_frame_cursors(thd, cursor_manager, item_win_func);
cursor_managers->push_back(cursor_manager);