From 454b9b1bdc7018d4e9dbe20440cbd6360eeee99e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Mon, 11 Sep 2017 22:46:11 +0300 Subject: MDEV-13774: Server Crash on Execute of SQL Statement Window functions can not be used as arguments to aggregate functions, as the aggregation happens before window function computation. Disallow such constructs by returning an error. In order to detect this case a change was needed in the base Item_sum_xxx::fix_fields to propagate the with_window_func flag. Item_func_group_concat requires the same change. --- sql/share/errmsg-utf8.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/share') diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 1e63cedcba5..49b2c8b76ef 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -7740,4 +7740,5 @@ ER_RDB_TTL_DURATION_FORMAT ER_PER_INDEX_CF_DEPRECATED eng "The per-index column family option has been deprecated" - +ER_SUM_FUNC_WITH_WINDOW_FUNC_AS_ARG + eng "Window functions can not be used as arguments to group functions." -- cgit v1.2.1