• unknown's avatar
    WL#3071 - Maria checkpoint · c2084d2a
    unknown authored
    Observe WAL for the table's state: all log records needed for undoing
    uncommitted state must be in the log before we flush state.
    
    
    storage/maria/ha_maria.cc:
      comments
    storage/maria/ma_bitmap.c:
      Comment for why there is no bug
    storage/maria/ma_blockrec.c:
      comment for why there is no bug
    storage/maria/ma_checkpoint.c:
      Observe WAL for the table's state: all log records needed for undoing
      uncommitted state must be in the log before we flush state. I tested
      by hand that the bug existed (create table, insert one row into it
      but let that insert pause after increasing data_file_length, let
      checkpoint start but kill it after it has flushed state).
      Log contains nothing, table is not recovered though it has
      a too big data_file_length. With this bugfix, the log contains
      REDO so table is opened so data_file_length is corrected.
    storage/maria/ma_close.c:
      If table is read-only we must never write to it.
      Should be a no-change in fact, as if read-only, share->changed is
      normally always false.
    storage/maria/ma_recovery.c:
      documenting bug found by Monty. Print when fixing data_file_length.
    c2084d2a
ma_checkpoint.c 44.5 KB