• Marko Mäkelä's avatar
    MDEV-13564: Set innodb_safe_truncate=ON by default · 853a0a43
    Marko Mäkelä authored
    The setting innodb_safe_truncate=ON reduces compatibility with older
    versions of MariaDB and backup tools in two ways.
    
    First, we will be writing TRX_UNDO_RENAME_TABLE records, which older
    versions do not know about. These records could be misinterpreted if
    a DDL transaction was recovered and would be rolled back.
    Such rollback is only possible if the server was killed while
    an incomplete DDL transaction was persisted. On transaction completion,
    the insert_undo log pages would only be repurposed for new undo log
    allocations, and their contents would not matter. So, older versions
    will not have a problem with innodb_safe_truncate=ON if the server was
    shut down cleanly.
    
    Second, to prevent such recovery failure, innodb_safe_truncate=ON will
    cause a modification of the redo log format identifier, which will
    prevent older versions from starting up after a crash. MariaDB Server
    versions older than 10.2.13 will refuse to start up altogether, even
    after clean shutdown.
    
    A server restart with innodb_safe_truncate=OFF will restore compatibility
    with older server and backup versions.
    853a0a43
truncate_purge_debug.opt 108 Bytes