-
Guilhem Bichot authored
storage/maria/ma_loghandler.c: Normally, when we log LOGREC_LONG_TRANSACTION_ID, undo_lsn should be 0: assert this. storage/maria/ma_test_force_start.pl: this script does not work with mtr2, make it use mtr1 storage/maria/trnman.c: The bug's cause was that: transaction would log LOGREC_LONG_TRANSACTION_ID, then Checkpoint would run and skip it (because its undo_lsn is still 0), then transaction would log REDO+UNDO, then crash. At Recovery, REDO phase would start from Checkpoint's record LSN, so wouldn't see LOGREC_LONG_TRANSACTION_ID, and as Checkpoint record does not mention transaction, transaction would be unknown, so its REDO+UNDO would be thrown away (assumed to belong to a transaction committed long ago as unknown), so transaction would not be rolled back, which is wrong. Fix is: it was wrong to skip a transaction if undo_lsn is 0; as soon as LOGREC_LONG_TRANSACTION_ID has been logged, it becomes potentially invisible to the REDO phase, and so we must include this transaction in the checkpoint record.
a1245a77