• Marko Mäkelä's avatar
    MDEV-28415 ALTER TABLE on a large table hangs InnoDB · f21a8756
    Marko Mäkelä authored
    buf_flush_page(): Never wait for a page latch, even in checkpoint
    flushing (flush_type == BUF_FLUSH_LIST), to prevent a hang of the
    page cleaner threads when a large number of pages is latched.
    
    In mysql/mysql-server@9542f3015b00330ef537f6223565b28b82a5b325
    it was claimed that such a hang only affects CREATE FULLTEXT INDEX.
    Their fix was to retain buffer-fix but release exclusive latch
    on non-leaf pages, and subsequently write to those pages while
    they are not associated with the mini-transaction, which would
    trip a debug assertion in the MariaDB version of
    mtr_t::memo_modify_page() and cause potential corruption
    when using the default MariaDB setting innodb_log_optimize_ddl=OFF.
    
    This change essentially backports a small part of
    commit 7cffb5f6 (MDEV-23399)
    from MariaDB Server 10.5.7.
    f21a8756
buf0flu.cc 102 KB