• Kristian Nielsen's avatar
    Revert: MDEV-22351 InnoDB may recover wrong information after RESET MASTER · 90444a4f
    Kristian Nielsen authored
    This commit can cause the wrong (old) binlog position to be recovered by
    mariabackup --prepare. It implements that the value of the FIL_PAGE_LSN is
    compared to determine which binlog position is the last one and should be
    recoved. However, it some cases it is seen that the FIL_PAGE_LSN order does
    not match the binlog position commit order, as is assumed by the code.
    
    In one example, the recovery first encountered this in trx_rseg_mem_restore():
    
      lsn=27282754  binlog position (./master-bin.000001, 472908)
    
    and then later:
    
      lsn=27282699  binlog position (./master-bin.000001, 477164)
    
    The last one 477164 is the correct position. However, because the LSN
    encountered for the first one is higher, that position is recovered instead.
    This results in too old binlog position, and a newly provisioned slave will
    start replicating too early and get duplicate key error or similar.
    Signed-off-by: default avatarKristian Nielsen <knielsen@knielsen-hq.org>
    90444a4f
trx0rseg.cc 22.1 KB