• Vlad Lesin's avatar
    MDEV-23711 make mariabackup innodb redo log read error message more clear · 0a224edc
    Vlad Lesin authored
    log_group_read_log_seg() returns error when:
    
    1) Calculated log block number does not correspond to read log block
    number. This can be caused by:
      a) Garbage or an incompletely written log block. We can exclude this
      case by checking log block checksum if it's enabled(see innodb-log-checksums,
      encrypted log block contains checksum always).
      b) The log block is overwritten. In this case checksum will be correct and
      read log block number will be greater then requested one.
    
    2) When log block length is wrong. In this case recv_sys->found_corrupt_log
    is set.
    
    3) When redo log block checksum is wrong. In this case innodb code
    writes messages to error log with the following prefix: "Invalid log
    block checksum."
    
    The fix processes all the cases above.
    0a224edc
innodb_redo_overwrite.test 2.41 KB