• mhansson/martin@linux-st28.site's avatar
    Bug #30596 GROUP BY optimization gives wrong result order · a4d5d920
    mhansson/martin@linux-st28.site authored
    The optimization that uses a unique index to remove GROUP BY, did not 
    ensure that the index was actually used, thus violating the ORDER BY
    that is impled by GROUP BY.
    Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains
    a unique index. In case GROUP BY ... ORDER BY null is used, GROUP BY is
    simply removed.
    a4d5d920
group_by.result 36.6 KB