• Sergey Glukhov's avatar
    Bug#51431 Wrong sort order after import of dump file · 1c538876
    Sergey Glukhov authored
    The problem is that QUICK_SELECT_DESC behaviour depends
    on used_key_parts value which can be bigger than selected
    best_key_parts value if an engine supports clustered key.
    But used_key_parts is overwritten with best_key_parts
    value that prevents from correct selection of index
    access method. The fix is to preserve used_key_parts
    value for further use in QUICK_SELECT_DESC.
    
    
    mysql-test/r/innodb_mysql.result:
      test case
    mysql-test/t/innodb_mysql.test:
      test case
    sql/sql_select.cc:
      preserve used_key_parts value for further use in QUICK_SELECT_DESC
    1c538876
innodb_mysql.test 19.3 KB