Bug #116445 recv_sys->scanned_epoch_no lost assignment when parse_start_lsn is first set

Submitted: 22 Oct 2024 11:01 Modified: 23 Oct 2024 5:18
Reporter: mengchu shi (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.4,8.1,8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution, redo

[22 Oct 2024 11:01] mengchu shi
Description:
In the function recv_scan_log_recs, recv_sys->scanned_epoch_no lost the first assignment when recv_sys->parse_start_lsn is first set.

How to repeat:
Read the codes directly.
```c++
#ifndef UNIV_HOTBACKUP
static bool recv_scan_log_recs(log_t &log,
#else  /* !UNIV_HOTBACKUP */
bool meb_scan_log_recs(
#endif /* !UNIV_HOTBACKUP */
                               size_t max_memory, const byte *buf, size_t len,
                               lsn_t start_lsn, lsn_t *read_upto_lsn) {
  ...
    if (!recv_sys->parse_start_lsn && block_header.m_first_rec_group > 0) {
      ...
      recv_sys->scanned_lsn = recv_sys->parse_start_lsn;
      /* Here lost the assignment of recv_sys->scanned_epoch_no */
      recv_sys->recovered_lsn = recv_sys->parse_start_lsn;
      ...
    }
  ...
}
```
[22 Oct 2024 11:02] mengchu shi
Bug116445.diff

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: Bug116445.diff (application/octet-stream, text), 480 bytes.

[22 Oct 2024 11:02] mengchu shi
Bug116445.diff

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: Bug116445.diff (application/octet-stream, text), 480 bytes.

[23 Oct 2024 5:18] MySQL Verification Team
Hello mengchu shi,

Thank you for the report and contribution.

regards,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.