• Marko Mäkelä's avatar
    MDEV-30819 InnoDB fails to start up after downgrading from MariaDB 11.0 · 08267ba0
    Marko Mäkelä authored
    While downgrades are not supported and misguided attempts at it could
    cause serious corruption especially after
    commit b07920b6
    it might be useful if InnoDB would start up even after an upgrade to
    MariaDB Server 11.0 or later had removed the change buffer.
    
    innodb_change_buffering_update(): Disallow anything else than
    innodb_change_buffering=none when the change buffer is corrupted.
    
    ibuf_init_at_db_start(): Mention a possible downgrade in the corruption
    error message. If innodb_change_buffering=none, ignore the error but do
    not initialize ibuf.index.
    
    ibuf_free_excess_pages(), ibuf_contract(), ibuf_merge_space(),
    ibuf_update_max_tablespace_id(), ibuf_delete_for_discarded_space(),
    ibuf_print(): Check for !ibuf.index.
    
    ibuf_check_bitmap_on_import(): Remove some unnecessary code.
    This function is only accessing change buffer bitmap pages in a
    data file that is not attached to the rest of the database.
    It is not accessing the change buffer tree itself, hence it does
    not need any additional mutex protection.
    
    This has been tested both by starting up MariaDB Server 10.8 on
    a 11.0 data directory, and by running ./mtr --big-test while
    ibuf_init_at_db_start() was tweaked to always fail.
    08267ba0
srv0start.cc 59.6 KB