diff options
author | unknown <guilhem@gbichot4.local> | 2007-12-10 23:26:53 +0100 |
---|---|---|
committer | unknown <guilhem@gbichot4.local> | 2007-12-10 23:26:53 +0100 |
commit | 13f45b160b0704f7acf704fa1b442be93e4655d7 (patch) | |
tree | 4d5ba538121fbd22ca8042ad573cb85f3caa188f /storage/maria/ma_blockrec.h | |
parent | 12a81c39cd91347a27cf458363aab5b9645022cd (diff) | |
download | mariadb-git-13f45b160b0704f7acf704fa1b442be93e4655d7.tar.gz |
WL#3072 Maria recovery:
fix for bug: if a crash happened right after writing a REDO like this:
REDO - UNDO - REDO*, then recovery would ignore the last REDO* (ok),
rollback: REDO - UNDO - REDO* - REDO - CLR, and a next recovery would
thus execute REDO* instead of skipping it again. Recovery now logs
LOGREC_INCOMPLETE_GROUP when it meets REDO* for the first time,
to draw a boundary and ensure it is always skipped. Tested by hand.
Note: ma_test_all fails "maria_chk: error: Key 1 - Found too many records"
not due to this patch (failed before).
BitKeeper/triggers/post-commit:
no truncation of the commit mail, or how to review patches?
mysql-test/include/maria_verify_recovery.inc:
let caller choose the statement used to crash (sometimes we
want the crash to happen at special places)
mysql-test/t/maria-recovery.test:
user of maria_verify_recovery.inc now specifies statement which the
script should use for crashing.
storage/maria/ma_bitmap.c:
it's easier to search for all places using functions from the bitmap
module (like in ma_blockrec.c) if those exported functions all start
with "_ma_bitmap": renaming some of them.
Assertion that when we read a bitmap page, overwriting bitmap->map,
we are not losing information (i.e. bitmap->changed is false).
storage/maria/ma_blockrec.c:
update to new names. Adding code (disabled, protected by a #ifdef)
that I use to test certain crash scenarios (more to come).
storage/maria/ma_blockrec.h:
update to new names
storage/maria/ma_checkpoint.c:
update to new names
storage/maria/ma_extra.c:
update to new names
storage/maria/ma_loghandler.c:
new LOGREC_INCOMPLETE_GROUP
storage/maria/ma_loghandler.h:
new LOGREC_INCOMPLETE_GROUP
storage/maria/ma_recovery.c:
When at the end of the REDO phase we have identified some transactions
with incomplete REDO groups (REDOs without an UNDO or CLR_END),
for each of them we log LOGREC_INCOMPLETE_GROUP. This way, the
upcoming UNDO phase can write more records for such transaction,
a future recovery won't pair the incomplete group with the
CLR_END (as there is LOGREC_INCOMPLETE_GROUP to draw a boundary).
Diffstat (limited to 'storage/maria/ma_blockrec.h')
-rw-r--r-- | storage/maria/ma_blockrec.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/storage/maria/ma_blockrec.h b/storage/maria/ma_blockrec.h index 01d01fc6c1f..89cdf088ac1 100644 --- a/storage/maria/ma_blockrec.h +++ b/storage/maria/ma_blockrec.h @@ -170,7 +170,7 @@ my_bool _ma_compare_block_record(register MARIA_HA *info, /* ma_bitmap.c */ my_bool _ma_bitmap_init(MARIA_SHARE *share, File file); my_bool _ma_bitmap_end(MARIA_SHARE *share); -my_bool _ma_flush_bitmap(MARIA_SHARE *share); +my_bool _ma_bitmap_flush(MARIA_SHARE *share); void _ma_bitmap_reset_cache(MARIA_SHARE *share); my_bool _ma_bitmap_find_place(MARIA_HA *info, MARIA_ROW *row, MARIA_BITMAP_BLOCKS *result_blocks); @@ -179,10 +179,12 @@ my_bool _ma_bitmap_free_full_pages(MARIA_HA *info, const uchar *extents, uint count); my_bool _ma_bitmap_set(MARIA_HA *info, ulonglong pos, my_bool head, uint empty_space); -my_bool _ma_reset_full_page_bits(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap, - ulonglong page, uint page_count); -my_bool _ma_set_full_page_bits(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap, - ulonglong page, uint page_count); +my_bool _ma_bitmap_reset_full_page_bits(MARIA_HA *info, + MARIA_FILE_BITMAP *bitmap, + ulonglong page, uint page_count); +my_bool _ma_bitmap_set_full_page_bits(MARIA_HA *info, + MARIA_FILE_BITMAP *bitmap, + ulonglong page, uint page_count); uint _ma_free_size_to_head_pattern(MARIA_FILE_BITMAP *bitmap, uint size); my_bool _ma_bitmap_find_new_place(MARIA_HA *info, MARIA_ROW *new_row, ulonglong page, uint free_size, |