Commit bbef67f5 authored by Guilhem Bichot's avatar Guilhem Bichot

Fix for BUG#35801 "Maria: unreadable log during tests" and

BUG#35823 "Maria: log handler assertion (page[page_offset] & (3 << 6)) == 0x00... fails"
Both random problems can be explained by the REDO phase starting from a log horizon which is not a LSN,
which is the bug fixed here.

storage/maria/ma_recovery.c:
  In Recovery, REDO phase needs to start log reading from a LSN, not a log horizon: start_address was only
  guaranteed to be a horizon, not necessarily a LSN.
  On some machine and test, it happened that start_address was only a log horizon, and run_redo_phase()
  tried to read from there, and log handler naturally refused that:
  ma_loghandler.c:6797: translog_read_record_header_from_buffer: Assertion `translog_is_LSN_chunk(page[page_offset])' failed. And in non-debug build, just the "redo phase failed" message in the error log.
  This was random, because depended on amount of checkpoints which is timing-dependent; also depended on Maria tests
  ran or skipped (so, debug or non-debug builds)... Bad code was introduced by me end of December so it's likely
  to explain lots of random log handler errors we observed since.
parent 8ac71501
......@@ -3060,7 +3060,8 @@ static LSN parse_checkpoint_record(LSN lsn)
Find LSN higher or equal to this TRANSLOG_ADDRESS, suitable for
translog_read_record() functions.
*/
checkpoint_start= translog_next_LSN(start_address, LSN_IMPOSSIBLE);
start_address= checkpoint_start=
translog_next_LSN(start_address, LSN_IMPOSSIBLE);
if (checkpoint_start == LSN_IMPOSSIBLE)
{
/*
......
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