Bug #91513 log_end isn't correctly calculated in mlog_open_and_write_index
Submitted: 2 Jul 2018 6:39 Modified: 2 Jul 2018 11:17
Reporter: zhai weixiang (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0,5.7 OS:Any
Assigned to: CPU Architecture:Any

[2 Jul 2018 6:39] zhai weixiang
Description:
quoted code from 8.0.11

mlog_open_and_write_index:

 if (!page_rec_is_comp(rec)) {
    log_start = log_ptr = mlog_open(mtr, 11 + size);
    if (!log_ptr) {
      return (NULL); /* logging is disabled */
    }
    log_ptr = mlog_write_initial_log_record_fast(rec, type, log_ptr, mtr);
    log_end = log_ptr + 11 + size;
  } else {
    ulint i;

If I understand correctly, log_end tracks the end position of an opened mlog. so here log_end should be:
log_end = log_start + 11 + size;

How to repeat:
read the code 

Suggested fix:
adjust as mentioned above
[2 Jul 2018 11:17] MySQL Verification Team
Hello Zhai,

Thank you for the report.

Regards,
Umesh