Skip to content

Commit

Permalink
Force need_tmp to true if we have window functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
cvicentiu authored and spetrunia committed Feb 14, 2016
1 parent cb83e6c commit 9a2d895
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sql/sql_select.cc
Expand Up @@ -1819,6 +1819,10 @@ JOIN::optimize_inner()
}

need_tmp= test_if_need_tmp_table();
//TODO this could probably go in test_if_need_tmp_table.
if (this->select_lex->window_specs.elements > 0) {
need_tmp= TRUE;
}

/*
If the hint FORCE INDEX FOR ORDER BY/GROUP BY is used for the table
Expand Down

0 comments on commit 9a2d895

Please sign in to comment.