1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug #32268: Indexed queries give bogus MIN and MAX results

Loose index scan does the grouping so the temp table does 
not need to do it, even when sorting.
Fixed by checking if the grouping is already done before
doing sorting and grouping in a temp table and do only 
sorting.
This commit is contained in:
gkodinov/kgeorge@magare.gmz
2007-11-20 16:07:24 +02:00
parent 7b38492a4c
commit 50d8511136
3 changed files with 72 additions and 1 deletions

View File

@@ -10256,7 +10256,8 @@ Next_select_func setup_end_select_func(JOIN *join)
/* Set up select_end */
if (table)
{
if (table->group && tmp_tbl->sum_func_count)
if (table->group && tmp_tbl->sum_func_count &&
!tmp_tbl->precomputed_group_by)
{
if (table->s->keys)
{