summaryrefslogtreecommitdiff
path: root/sql/item_sum.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2017-02-01 19:15:28 -0800
committerIgor Babaev <igor@askmonty.org>2017-02-01 19:15:28 -0800
commit8481c70ede067b576d5b1576a9b68042e84368fb (patch)
tree568c142550bde93e45e7d5a39ae32cff42b2a7cf /sql/item_sum.h
parent69114862f21dadb5c660847c691cc24456c90970 (diff)
downloadmariadb-git-8481c70ede067b576d5b1576a9b68042e84368fb.tar.gz
Fixed bug mdev-11867.
If a window function with aggregation is over the result set of a grouping query then the argument of the aggregate function from the window function is allowed to be an aggregate function itself.
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r--sql/item_sum.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h
index 84049814ef9..940726b5d8e 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -340,6 +340,9 @@ private:
*/
bool with_distinct;
+ /* TRUE if this is aggregate function of a window function */
+ bool window_func_sum_expr_flag;
+
public:
bool has_force_copy_fields() const { return force_copy_fields; }
@@ -551,6 +554,7 @@ public:
virtual void cleanup();
bool check_vcol_func_processor(void *arg);
virtual void setup_window_func(THD *thd, Window_spec *window_spec) {}
+ void mark_as_window_func_sum_expr() { window_func_sum_expr_flag= true; }
};