Skip to content

Commit 29150e2

Browse files
committed
Revert part of b853b4f
recv_parse_log_recs(): Do not check for corruption before checking for end-of-log-buffer. For some reason, adding the check to the logical-looking place would cause intermittent recovery failures in the tests innodb.innodb-index and innodb_gis.rtree_compress2.
1 parent b853b4f commit 29150e2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

storage/innobase/log/log0recv.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,6 +2401,10 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
24012401
len = recv_parse_log_rec(&type, ptr, end_ptr, &space,
24022402
&page_no, apply, &body);
24032403

2404+
if (len == 0) {
2405+
return(false);
2406+
}
2407+
24042408
if (recv_sys->found_corrupt_log) {
24052409
recv_report_corrupt_log(ptr, type, space, page_no);
24062410
return(true);
@@ -2410,10 +2414,6 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
24102414
return(true);
24112415
}
24122416

2413-
if (len == 0) {
2414-
return(false);
2415-
}
2416-
24172417
new_recovered_lsn = recv_calc_lsn_on_data_add(old_lsn, len);
24182418

24192419
if (new_recovered_lsn > recv_sys->scanned_lsn) {
@@ -2540,6 +2540,10 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
25402540
&type, ptr, end_ptr, &space, &page_no,
25412541
false, &body);
25422542

2543+
if (len == 0) {
2544+
return(false);
2545+
}
2546+
25432547
if (recv_sys->found_corrupt_log
25442548
|| type == MLOG_CHECKPOINT
25452549
|| (*ptr & MLOG_SINGLE_REC_FLAG)) {
@@ -2553,10 +2557,6 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
25532557
return(true);
25542558
}
25552559

2556-
if (len == 0) {
2557-
return(false);
2558-
}
2559-
25602560
recv_previous_parsed_rec_type = type;
25612561
recv_previous_parsed_rec_offset
25622562
= recv_sys->recovered_offset + total_len;

0 commit comments

Comments
 (0)