1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3

This commit is contained in:
Alexander Barkov
2017-07-31 23:00:59 +04:00
29 changed files with 1098 additions and 781 deletions

View File

@ -3405,8 +3405,14 @@ void JOIN::exec_inner()
if (zero_result_cause)
{
if (select_lex->have_window_funcs())
if (select_lex->have_window_funcs() && send_row_on_empty_set())
{
/*
The query produces just one row but it has window functions.
The only way to compute the value of window function(s) is to
run the entire window function computation step (there is no shortcut).
*/
const_tables= table_count;
first_select= sub_select_postjoin_aggr;
}