• Guilhem Bichot's avatar
    Fix for BUG#35801 "Maria: unreadable log during tests" and · bbef67f5
    Guilhem Bichot authored
    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.
    bbef67f5
ma_recovery.c 111 KB