Commit 38018f48 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-19586: Remove unnecessary iteration

recv_apply_hashed_log_recs(): Refer directly to recs.last->end_lsn
instead of iterating the entire list starting from recs.log.
parent b6e0d247
......@@ -2139,12 +2139,7 @@ void recv_apply_hashed_log_recs(bool last_batch)
break;
case recv_sys_t::recs_t::RECV_WILL_NOT_READ:
mlog_init_t::init& i = mlog_init.last(page_id);
lsn_t end_lsn = 0;
for (const recv_t* r = recs.log; r; r = r->next) {
ut_ad(r->end_lsn);
ut_ad(r->end_lsn >= end_lsn);
end_lsn = r->end_lsn;
}
const lsn_t end_lsn = recs.last->end_lsn;
if (end_lsn < i.lsn) {
DBUG_LOG("ib_log", "skip log for page "
<< page_id
......
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