Fix for BUG#21787: COUNT(*) + ORDER BY + LIMIT returns wrong result
The problem was due to a prior fix for BUG 9676, which limited the rows stored in a temporary table to the LIMIT clause. This optimization is not applicable to non-group queries with aggregate functions. The fix disables the optimization in this case.
Showing
Please register or sign in to comment