diff options
author | Michael Widenius <monty@askmonty.org> | 2013-05-11 12:20:21 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2013-05-11 12:20:21 +0300 |
commit | 5b31f8785840d63e6a2516758bcd68ac1307d7a7 (patch) | |
tree | 6e4bf5da647447d3f57c5c4845b880d49ccc441f /storage/maria/ma_blockrec.c | |
parent | 3b944843d2c65f953dadc5d4908d1b8223d2f36e (diff) | |
download | mariadb-git-5b31f8785840d63e6a2516758bcd68ac1307d7a7.tar.gz |
MDEV-4231: Possible bug in function _ma_apply_undo_row_insert()
Added comment to clearify the code.
storage/maria/ma_blockrec.c:
Added comment to clearify the code
In case of out of memory or disk error, mark pages with LSN_IMPOSSIBLE to make it easier to know which pages have wrong information.
Diffstat (limited to 'storage/maria/ma_blockrec.c')
-rw-r--r-- | storage/maria/ma_blockrec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c index 622d2581cc9..ab134bbac10 100644 --- a/storage/maria/ma_blockrec.c +++ b/storage/maria/ma_blockrec.c @@ -6937,6 +6937,7 @@ my_bool _ma_apply_undo_row_insert(MARIA_HA *info, LSN undo_lsn, res= 0; end: + /* The following is true only if _ma_bitmap_flushable() was called earlier */ if (info->non_flushable_state) _ma_bitmap_flushable(info, -1); _ma_unpin_all_pages_and_finalize_row(info, lsn); @@ -6946,6 +6947,11 @@ err: DBUG_ASSERT(!maria_assert_if_crashed_table); res= 1; _ma_mark_file_crashed(share); + /* + Don't write a new LSN on the used pages. Not important as the file is + marked as crashed and need to be repaired before it can be used. + */ + lsn= LSN_IMPOSSIBLE; goto end; } |