• unknown's avatar
    WL#3072 Maria Recovery · 9c2ff270
    unknown authored
    * recovery from ha_maria now skips replaying DDLs (too dangerous)
    * maria_read_log still replays DDLs, print warning about issues
    * fixes to replaying of REDO_RENAME
    * don't replay DDLs on corrupted tables (safer)
    * print a one-line message when really doing a recovery (applies to
    ha_maria, not maria_read_log) i.e. some REDOs or UNDOs are read.
    
    
    storage/maria/ma_checkpoint.c:
      fix for assertion failure
    storage/maria/ma_recovery.c:
      * Recovery from ha_maria now skips replaying DDLs (as the initial
      plan said) as this is unsafe in case of crashes during the DDL;
      applying the records may do harm (destroy important files)
      so we prefer to leave the "mess" of files untouched. A proper
      recovery of DDLs requires very careful thinking, probably testing
      separately the existence of the data and index file instead of
      using maria_open() which tests the existence of both, and maybe
      storing create_rename_lsn in the data file too.
      * maria_read_log still replays DDLs, we print a warning about dangers
      (due to ALTER TABLE not logging insertions into the tmp table; we
      will maybe need an option to have logging of those insertions).
      * fixes to replaying of REDO_RENAME (test create_rename_lsn of 'new_name'
      table if it exists; if that table exists and is more recent than the
      record, remove the 'old_name' table).
      * don't replay DDLs on corrupted tables (play safe)
      * fail also in non-debug builds if table is open when it should not be
      (when creating it for example, it should not be already open).
      * when the trace file is not stdout (i.e. when this is ha_maria),
      if really doing a recovery (reading REDOs or UNDOs), print a one-line
      message to stderr to inform about start and end of recovery
      (useful to know what mysqld is doing, especially if it takes long
      or crashes).
    storage/maria/ma_recovery.h:
      parameter to replay DDLs or not
    storage/maria/maria_read_log.c:
      replay DDLs in maria_read_log, to be able to recreate tables from
      scratch.
    9c2ff270
maria_read_log.c 5.7 KB