• Marko Mäkelä's avatar
    MDEV-25886 CHECK TABLE crash with DB_MISSING_HISTORY if innodb_read_only · 75a65d32
    Marko Mäkelä authored
    Occasionally, the test innodb.alter_copy would fail in MariaDB 10.6.1,
    reporting DB_MISSING_HISTORY during CHECK TABLE. It started to occur during
    the development of MDEV-25180, which introduced purge_sys.stop_SYS().
    If we delay purge more during DDL operations, then the test would
    almost always fail. The reason is that during startup we will restore
    a purge view, and CHECK TABLE would still use REPEATABLE READ
    even though innodb_read_only is set and other isolation levels
    than READ UNCOMMITTED are not guaranteed to work.
    
    ha_innobase::check(): Use READ UNCOMMITTED isolation level if
    innodb_read_only is set or innodb_force_recovery exceeds 3.
    
    dict_set_corrupted(): Do not update the persistent data dictionary
    if innodb_force_recovery exceeds 3.
    75a65d32
ha_innodb.cc 622 KB