• gkodinov/kgeorge@magare.gmz's avatar
    Bug #31001: ORDER BY DESC in InnoDB not working · a2afc56f
    gkodinov/kgeorge@magare.gmz authored
    The optimizer sets index traversal in reverse order only if there are 
     used key parts that are not compared to a constant.
    However using the primary key as an ORDER BY suffix rendered the check
    incomplete : going in reverse order must still be used even if 
    all the parts of the secondary key are compared to a constant.
    
    Fixed by relaxing the check and set reverse traversal even when all
    the secondary index keyparts are compared to a const.
    Also account for the case when all the primary keys are compared to a
    constant.
    a2afc56f
innodb_mysql.test 29 KB