1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge with 4.0 to get fix for MIN/MAX

This commit is contained in:
monty@mashka.mysql.fi
2003-02-07 16:38:37 +02:00
48 changed files with 533 additions and 32 deletions

View File

@ -4981,6 +4981,11 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
{
if ((error=(*join_tab->next_select)(join,join_tab+1,0)) < 0)
return error;
/*
Test if this was a SELECT DISTINCT query on a table that
was not in the field list; In this case we can abort if
we found a row, as no new rows can be added to the result.
*/
if (not_used_in_distinct && found_records != join->found_records)
return 0;
}