diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-02-07 16:49:41 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-02-14 07:46:58 +0200 |
commit | 57341852b5b1e40b1f92e248d84f95de988022c0 (patch) | |
tree | 448800453edaae7503b31f91217089aa7c5be9af /sql/item_windowfunc.h | |
parent | f675eab7dc7f1eb4f4b61bfdd548d9e8052678a4 (diff) | |
download | mariadb-git-57341852b5b1e40b1f92e248d84f95de988022c0.tar.gz |
MDEV-11746: Wrong result upon using FIRST_VALUE with a window frame
Reimplement FIRST_VALUE to act as NTH_VALUE with 0 offset. The previous
implementation was flawed when the window frame would remove values.
Diffstat (limited to 'sql/item_windowfunc.h')
-rw-r--r-- | sql/item_windowfunc.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h index 2beed69c0fa..b4953c8a6ac 100644 --- a/sql/item_windowfunc.h +++ b/sql/item_windowfunc.h @@ -331,16 +331,8 @@ class Item_sum_first_value : public Item_sum_hybrid_simple { public: Item_sum_first_value(THD* thd, Item* arg_expr) : - Item_sum_hybrid_simple(thd, arg_expr), - value_added(false) {} - - bool add(); + Item_sum_hybrid_simple(thd, arg_expr) {} - void clear() - { - value_added= false; - Item_sum_hybrid_simple::clear(); - } enum Sumfunctype sum_func () const { @@ -354,9 +346,6 @@ class Item_sum_first_value : public Item_sum_hybrid_simple Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy<Item_sum_first_value>(thd, mem_root, this); } - - private: - bool value_added; }; /* |