diff options
author | bell@sanja.is.com.ua <> | 2002-12-07 16:00:39 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2002-12-07 16:00:39 +0200 |
commit | b1beb31400540e16f3294e18e7f664c641093dbc (patch) | |
tree | 589392bd88299b6d6ae1605cf6808499e8bbcb7c /sql/sql_select.cc | |
parent | ed8cc2a844738386ae3eef3b3b01c0e784a0b3f6 (diff) | |
download | mariadb-git-b1beb31400540e16f3294e18e7f664c641093dbc.tar.gz |
Row item fixing (SCRUM related)
Inserted comment
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 50820b931b6..4e9f8cf9383 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -763,6 +763,16 @@ JOIN::exec() select_options, unit))) DBUG_VOID_RETURN; + /* + We don't have to store rows in temp table that doesn't match HAVING if: + - we are sorting the table and writing complete group rows to the + temp table. + - We are using DISTINCT without resolving the distinct as a GROUP BY + on all columns. + + If having is not handled here, it will be checked before the row + is sent to the client. + */ if (having_list && (sort_and_group || (exec_tmp_table->distinct && !group_list))) having=having_list; |