diff options
author | Igor Babaev <igor@askmonty.org> | 2016-03-18 00:33:53 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2016-03-18 00:33:53 -0700 |
commit | a197c6bb68d77a0ec73b28d1e6473022ea6b1ae0 (patch) | |
tree | a91588ab6a002b5ef7bedd006a6b23ee8957355c /sql/item_windowfunc.cc | |
parent | 761590dcd53162e7b73421eb6a61cd399f4dc70d (diff) | |
download | mariadb-git-a197c6bb68d77a0ec73b28d1e6473022ea6b1ae0.tar.gz |
Prohibit using window functions of some types with
window frames in full accordance with the SQL standard.
Diffstat (limited to 'sql/item_windowfunc.cc')
-rw-r--r-- | sql/item_windowfunc.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc index e446924ff65..7f668ab8fab 100644 --- a/sql/item_windowfunc.cc +++ b/sql/item_windowfunc.cc @@ -53,6 +53,12 @@ Item_window_func::fix_fields(THD *thd, Item **ref) if (window_name && resolve_window_name(thd)) return true; + if (window_spec->window_frame && is_frame_prohibited()) + { + my_error(ER_NOT_ALLOWED_WINDOW_FRAME, MYF(0), window_func->func_name()); + return true; + } + /* TODO: why the last parameter is 'ref' in this call? What if window_func decides to substitute itself for something else and does *ref=.... ? |