• Evgeny Potemkin's avatar
    Bug #55656: mysqldump can be slower after bug 39653 fix. · b4dc600a
    Evgeny Potemkin authored
    After fix for bug 39653 the shortest available secondary index was used for
    full table scan. Primary clustered key was used only if no secondary index
    can be used. However, when chosen secondary index includes all fields of the
    table being scanned it's better to use primary index since the amount of
    data to scan is the same but the primary index is clustered.
    Now the find_shortest_key function takes this into account.
    
    
    mysql-test/suite/innodb/r/innodb_mysql.result:
      Added a test case for the bug#55656.
    mysql-test/suite/innodb/t/innodb_mysql.test:
      Added a test case for the bug#55656.
    sql/sql_select.cc:
      Bug #55656: mysqldump can be slower after bug #39653 fix.
      The find_shortest_key function now prefers clustered primary key
      if found secondary key includes all fields of the table.
    b4dc600a
innodb_mysql.result 70.2 KB