Commit 8e2211e0 authored by unknown's avatar unknown

WL#3071 - Maria checkpoint

don't take a checkpoint at end of REDO phase because blocks' rec_lsn
are not set. Fixes some assertion failures during tests of killing
the UNDO phase (recovery then started from the end-of-REDO-phase
checkpoint, wrongly ignoring REDOs before that record).


storage/maria/ma_blockrec.c:
  note for a bug (mail sent to colleagues, put on todo)
storage/maria/ma_recovery.c:
  this checkpoint at end of REDO phase is incorrect, disabling it.
  The one at end of UNDO phase remains.
parent d4b296b6
...@@ -1537,6 +1537,7 @@ static my_bool write_full_pages(MARIA_HA *info, ...@@ -1537,6 +1537,7 @@ static my_bool write_full_pages(MARIA_HA *info,
length-= copy_length; length-= copy_length;
DBUG_ASSERT(share->pagecache->block_size == block_size); DBUG_ASSERT(share->pagecache->block_size == block_size);
/** @todo RECOVERY BUG the page does not get a rec_lsn with this! */
if (pagecache_write(share->pagecache, if (pagecache_write(share->pagecache,
&info->dfile, page, 0, &info->dfile, page, 0,
buff, share->page_type, buff, share->page_type,
......
...@@ -298,6 +298,15 @@ int maria_apply_log(LSN from_lsn, enum maria_apply_log_way apply, ...@@ -298,6 +298,15 @@ int maria_apply_log(LSN from_lsn, enum maria_apply_log_way apply,
fprintf(stderr, " (%.1f seconds); ", phase_took); fprintf(stderr, " (%.1f seconds); ", phase_took);
} }
/**
REDO phase does not fill blocks' rec_lsn, so a checkpoint now would be
wrong: if a future recovery used it, the REDO phase would always
start from the checkpoint and never from before, wrongly skipping REDOs
(tested).
@todo fix this.
*/
#if 0
if (take_checkpoints && checkpoint_useful) if (take_checkpoints && checkpoint_useful)
{ {
/* /*
...@@ -308,6 +317,7 @@ int maria_apply_log(LSN from_lsn, enum maria_apply_log_way apply, ...@@ -308,6 +317,7 @@ int maria_apply_log(LSN from_lsn, enum maria_apply_log_way apply,
if (ma_checkpoint_execute(CHECKPOINT_INDIRECT, FALSE)) if (ma_checkpoint_execute(CHECKPOINT_INDIRECT, FALSE))
goto err; goto err;
} }
#endif
if (should_run_undo_phase) if (should_run_undo_phase)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment