• Marko Mäkelä's avatar
    MDEV-13987 Hang in FLUSH TABLES...FOR EXPORT · fb5d5794
    Marko Mäkelä authored
    trx_purge_stop(): Release purge_sys->latch before attempting to
    wake up the purge threads, so that they can actually wake up.
    This is a regression of commit a13a636c
    which attempted to fix MDEV-11802 by ensuring that srv_purge_wakeup()
    will actually wait until all purge threads wake up.
    Due to the purge_sys->latch, the threads might never wake up,
    because some purge threads could end up waiting for purge_sys->latch
    in trx_undo_prev_version_build() while holding dict_operation_lock
    in shared mode. This in turn would block any DDL operations, the
    InnoDB master thread, and InnoDB shutdown.
    fb5d5794
trx0purge.cc 47.2 KB