diff options
author | Michael Widenius <monty@askmonty.org> | 2011-01-05 00:09:05 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-01-05 00:09:05 +0200 |
commit | 1e0b42d91ff9c9d806b95c4b04363fd61b42181e (patch) | |
tree | 64f8a17e9491ba17d4a6d0c299aa831291ea347f /storage/maria/ma_bitmap.c | |
parent | 427c6c78ded2ee3f22f709a50a08eccfb0394503 (diff) | |
download | mariadb-git-1e0b42d91ff9c9d806b95c4b04363fd61b42181e.tar.gz |
Fixed recovery problem in Aria where bitmap had wrong information after recovery.
LP#619731: Aria recovery corruption "Page 1: Row: 1 has an extent with wrong information in bitmap
storage/maria/ma_bitmap.c:
Don't send broadcast if no one is waiting for it
storage/maria/ma_blockrec.c:
Don't update bitmap if the page is not in the dirty_page list (or LSN is after checkpoint start)
Fixes the case where we have in the log redo_free_block followed by another redo entry for the same page which is ignored.
Also fixed that _ma_apply_redo_insert_row_blobs() doesn't update the bitmap in similar circumstances.
storage/maria/ma_blockrec.h:
Updated prototype
storage/maria/ma_check.c:
Added printing of bitmap information if used with maria_chk -vvv (for debugging)
storage/maria/ma_recovery.c:
Updated call parameters to _ma_apply_redo_free_blocks().
Diffstat (limited to 'storage/maria/ma_bitmap.c')
-rw-r--r-- | storage/maria/ma_bitmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/maria/ma_bitmap.c b/storage/maria/ma_bitmap.c index 7e68437de2b..bc83f6ea0e9 100644 --- a/storage/maria/ma_bitmap.c +++ b/storage/maria/ma_bitmap.c @@ -399,7 +399,8 @@ my_bool _ma_bitmap_flush_all(MARIA_SHARE *share) become false, wake them up. */ DBUG_PRINT("info", ("bitmap flusher waking up others")); - pthread_cond_broadcast(&bitmap->bitmap_cond); + if (bitmap->flush_all_requested) + pthread_cond_broadcast(&bitmap->bitmap_cond); } pthread_mutex_unlock(&bitmap->bitmap_lock); DBUG_RETURN(res); @@ -465,7 +466,8 @@ void _ma_bitmap_unlock(MARIA_SHARE *share) bitmap->flush_all_requested--; bitmap->non_flushable= 0; pthread_mutex_unlock(&bitmap->bitmap_lock); - pthread_cond_broadcast(&bitmap->bitmap_cond); + if (bitmap->flush_all_requested > 0) + pthread_cond_broadcast(&bitmap->bitmap_cond); DBUG_VOID_RETURN; } |