• unknown's avatar
    Maria: when logs have been manually deleted, last_logno and last_checkpoint_lsn · 345451ce
    unknown authored
    must be updated correctly. And Recovery should not assume that
    log 1 is available but just use first available log.
    
    
    mysql-test/r/maria-purge.result:
      result update
    mysql-test/t/maria-purge.test:
      like in other Maria tests (4294967296 is too big, causes warning)
    storage/maria/ma_loghandler.c:
      When log handler starts and discovers that logs are missing though
      control file says they should be there (they have been manually
      deleted), it decides to create a log
      with number last_logno+1. It needs to update control file with
      this new number, and also reset last_checkpoint_lsn to LSN_IMPOSSIBLE
      (last checkpoint went away when log was deleted).
      Fix for when translog_init() fails before allocating id_to_share
      (translog_destroy() tried to free NULL).
    storage/maria/ma_recovery.c:
      When logs have been manually deleted, translog_first_theoretical_lsn()
      always fails (it looks for log number 1). Recovery now uses
      translog_first_lsn_in_log() which just picks the first available log.
    345451ce
ma_loghandler.c 250 KB