• Marko Mäkelä's avatar
    MDEV-23484 Rollback unnecessarily acquires dict_sys.latch · 86a14289
    Marko Mäkelä authored
    row_undo(): Remove the unnecessary acquisition and release of
    dict_sys.latch. This was supposed to prevent the table from being
    dropped while the undo log record is being rolled back. But, thanks to
    trx_resurrect_table_locks() that was introduced in
    mysql/mysql-server@935ba09d52c1908bde273ad1940b5ab919d9763d
    and commit c291ddfd
    as well as commit 1bd681c8
    (MDEV-25506 part 3) tables will be protected against dropping
    due to table locks.
    
    This reverts commit 0049d5b5
    (which had reverted a previous attempt of fixing this) and addresses
    an earlier race condition with the following:
    
    prepare_inplace_alter_table_dict(): If recovered transactions hold
    locks on the table while we are executing online ADD INDEX, acquire
    a table lock so that the rollback of those recovered transactions will
    not interfere with the ADD INDEX.
    86a14289
handler0alter.cc 316 KB