• Georgi Kodinov's avatar
    Bug#37830 : ORDER BY ASC/DESC - no difference · 436f1dc4
    Georgi Kodinov authored
                      
    Range scan in descending order for c <= <col> <= c type of
    ranges was ignoring the DESC flag.
    However some engines like InnoDB have the primary key parts 
    as a suffix for every secondary key.
    When such primary key suffix is used for ordering ignoring 
    the DESC is not valid.
    But we generally would like to do this because it's faster.
                
    Fixed by performing only reverse scan if the primary key is used.
    Removed some dead code in the process.
    436f1dc4
sql_select.cc 500 KB