diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2008-06-12 15:49:19 +0200 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2008-06-12 15:49:19 +0200 |
commit | bbef67f5bd2c18e103aeb87780dafdf16ba9efff (patch) | |
tree | 58ec2fde76dcd33dc5f8d8697348cd2d98ca5b3b /storage/maria/ma_recovery.c | |
parent | 8ac71501fcc075f5bc37669d8294459ec7e79276 (diff) | |
download | mariadb-git-bbef67f5bd2c18e103aeb87780dafdf16ba9efff.tar.gz |
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.
Diffstat (limited to 'storage/maria/ma_recovery.c')
-rw-r--r-- | storage/maria/ma_recovery.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c index ec679609320..4dd10b2207f 100644 --- a/storage/maria/ma_recovery.c +++ b/storage/maria/ma_recovery.c @@ -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) { /* |