MDEV-31803 InnoDB aborts during recovery when immediate_scrub_data_uncompressed is enabled

Problem:
========
 - InnoDB scans the complete redo log to ensure that there is
no corruption and to find the end of the log. During this scan,
InnoDB saves all the freed ranges, but it doesn't save
recovered size. Later, InnoDB recovery applies partial
redo logs and IO thread tries to flush the all freed
ranges which was noted during previous complete scan of redo logs.

Fix:
====
 InnoDB should store the freed pages only when InnoDB stores
 the redo log records.
parent 732d1ec3
......@@ -2747,7 +2747,8 @@ recv_sys_t::parse_mtr_result recv_sys_t::parse(source &l, bool if_exists)
case INIT_PAGE:
last_offset= FIL_PAGE_TYPE;
free_or_init_page:
store_freed_or_init_rec(id, (b & 0x70) == FREE_PAGE);
if (store)
store_freed_or_init_rec(id, (b & 0x70) == FREE_PAGE);
if (UNIV_UNLIKELY(rlen != 0))
goto record_corrupted;
break;
......
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