Commit 5b31f878 authored by Michael Widenius's avatar Michael Widenius

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.
parent 3b944843
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment