• Alexey Kopytov's avatar
    Bug #46159: simple query that never returns · f1617238
    Alexey Kopytov authored
     
    The external 'for' loop in remove_dup_with_compare() handled 
    HA_ERR_RECORD_DELETED by just starting over without advancing 
    to the next record which caused an infinite loop. 
     
    This condition could be triggered on certain data by a SELECT 
    query containing DISTINCT, GROUP BY and HAVING clauses. 
    
    Fixed remove_dup_with_compare() so that we always advance to 
    the next record when receiving HA_ERR_RECORD_DELETED from 
    rnd_next(). 
    f1617238
distinct.test 20.8 KB