From 3dd3a5da0e9fbd8a24a178b2b295b5a385beba5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Thu, 22 Sep 2016 14:21:18 +0200 Subject: MDEV-9935: Window functions: assertion failure with empty OVER () clause Make window functions work with an empty over clause by forcing a sort on the first column of the current join_tab. This is a temporary fix until we get window functions to work with big tables. --- sql/sql_window.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/sql_window.h') diff --git a/sql/sql_window.h b/sql/sql_window.h index c3847240e9a..b94a1fc6dc4 100644 --- a/sql/sql_window.h +++ b/sql/sql_window.h @@ -186,7 +186,8 @@ private: class Window_funcs_sort : public Sql_alloc { public: - bool setup(THD *thd, SQL_SELECT *sel, List_iterator &it); + bool setup(THD *thd, SQL_SELECT *sel, List_iterator &it, + st_join_table *join_tab); bool exec(JOIN *join); void cleanup() { delete filesort; } -- cgit v1.2.1