• unknown's avatar
    WL#3072 Maria recovery · 63ff9877
    unknown authored
    Misc changes:
    - fix for benign Valgrind error, compiler warnings
    - fix for a segfault in execution of maria_delete_all_rows() and one
    when taking multiple checkpoints
    - fix for too paranoid assertion
    - adding ability to take checkpoints at the end of the REDO phase
    and at the end of recovery.
    - other minor changes
    
    
    storage/maria/ha_maria.cc:
      The checkpoint done after Recovery is finished, is moved to
      maria_recover().
    storage/maria/ma_bitmap.c:
      fix for Valgrind error: the "shadow debug copy" of the bitmap page
      started unitialized and so ma_print_bitmap() would use it uninitialized
    storage/maria/ma_checkpoint.c:
      * reset pointers to NULL after freeing them, or we segfault at
      next checkpoint in my_realloc().
      * fix for compiler warnings.
    storage/maria/ma_delete_all.c:
      info->trn is NULL for non-transactional tables
    storage/maria/ma_locking.c:
      correct assertion (it fired wrongly in execution of REDO_DROP_TABLE
      due to the maria_extra(HA_PREPARE_FOR_DROP)->_ma_decrement_open_count()
      ->maria_lock_database(F_UNLCK); another solution would have been to
      not call _ma_decrement_open_count() (it's ok to have a wrong open
      count in a table which we are dropping), but the same problem
      would still exist for REDO_RENAME_TABLE.
    storage/maria/ma_loghandler.c:
      fail early if UNRECOVERABLE_ERROR
    storage/maria/ma_recovery.c:
      * new argument to maria_apply_log(): should it take checkpoints
      (at end of REDO phase and at the very end) or no.
      * moving the call to translog_next_LSN() into
      parse_checkpoint_record() ("hide the details").
      * Refining an error detection for something which could happen
      if there is a checkpoint record in the log.
      * Using close_one_table() instead of maria_extra(HA_EXTRA_PREPARE_FOR_DROP|RENAME),
      as it looks safer, and also changing how close_one_table() works:
      it now limits itself to scanning all_tables[], thus having one loopp
      instead of two, which should be faster (as a result, it does not
      close tables not registered in this array, which is ok as there
      should not be any).
    storage/maria/ma_recovery.h:
      new parameter
    storage/maria/maria_read_log.c:
      update to new prototype
    63ff9877
ma_locking.c 17.9 KB