• Georgi Kodinov's avatar
    Bug#37830 : ORDER BY ASC/DESC - no difference · 59ab9a08
    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.
    59ab9a08
innodb_mysql.result 34.1 KB