#At bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-maria/
2651 Guilhem Bichot 2008-06-12
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.
modified:
storage/maria/ma_recovery.c
per-file comments:
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.
=== modified file 'storage/maria/ma_recovery.c'
--- a/storage/maria/ma_recovery.c 2008-06-02 20:53:25 +0000
+++ b/storage/maria/ma_recovery.c 2008-06-12 13:49:19 +0000
@@ -3060,7 +3060,8 @@ static LSN parse_checkpoint_record(LSN l
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)
{
/*
| Thread |
|---|
| • commit into MySQL/Maria:mysql-maria branch (guilhem:2651) Bug#35801,Bug#35823 | Guilhem Bichot | 12 Jun |