1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Row item fixing (SCRUM related)

Inserted comment
This commit is contained in:
bell@sanja.is.com.ua
2002-12-07 16:00:39 +02:00
parent ed8cc2a844
commit b1beb31400
3 changed files with 39 additions and 6 deletions

View File

@ -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;