diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2017-07-21 18:02:53 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2017-07-21 20:20:14 +0300 |
commit | 4bdf9318b6bab1bf8d3718c50f87871a4ae5ec9b (patch) | |
tree | 532546459dc47c60921c382e572279adeaea0b3a /sql/sql_select.cc | |
parent | 2a1035b004dfabcf3a7113be632b0030721a44d6 (diff) | |
download | mariadb-git-bb-10.2-mdev13355.tar.gz |
MDEV-13355: Assertion `using_unique_constraint || group_buff <= param->group_buff...bb-10.2-mdev13355
The code in OIN::optimize_inner() has this call
calc_group_buffer(this, group_list)
the call is however bypassed when the optimizer figures out that the JOIN
has "Impossible WHERE".
If we attempt to calculate the value of a window function afterwards,
we will get a crash when trying to create a temporary table.
So, put a call to calc_group_buffer() here as well. It's a bit surprising
that all these steps are done for a query that will produce zero rows
but we are just following the approach taken by the fix for mdev-11999
here.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 90f5e11dd16..f27f1024e73 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2176,6 +2176,7 @@ setup_subq_exit: choose_tableless_subquery_plan(); if (select_lex->have_window_funcs()) { + calc_group_buffer(this, group_list); if (!(join_tab= (JOIN_TAB*) thd->alloc(sizeof(JOIN_TAB)))) DBUG_RETURN(1); need_tmp= 1; |