diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-06-24 15:00:34 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-06-24 15:00:34 +0300 |
commit | 033e29b6a1a693a8b1f03c37f50918ecf1b25ac4 (patch) | |
tree | 6dd389c5b8325bb33656853812a5b41e85057f47 /storage/innobase/trx/trx0trx.cc | |
parent | b4c9cd201bbc9d6a1c8cbb0f2d5e12f28545afc6 (diff) | |
download | mariadb-git-033e29b6a1a693a8b1f03c37f50918ecf1b25ac4.tar.gz |
MDEV-26007 Rollback unnecessarily initiates redo log write
trx_t::commit_in_memory(): Do not initiate a redo log write if
the transaction has no visible effect. If anything for this
transaction had been made durable, crash recovery will roll back
the transaction just fine even if the end of ROLLBACK is not
durably written.
Rollbacks of transactions that are associated with XA identifiers
(possibly internally via the binlog) will always be persisted.
The test rpl.rpl_gtid_crash covers this.
Diffstat (limited to 'storage/innobase/trx/trx0trx.cc')
-rw-r--r-- | storage/innobase/trx/trx0trx.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index 0f735faacfa..dc7a719d5b0 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -1347,7 +1347,7 @@ inline void trx_t::commit_in_memory(const mtr_t *mtr) serialize all commits and prevent a group of transactions from gathering. */ - commit_lsn= mtr->commit_lsn(); + commit_lsn= undo_no || !xid->is_null() ? mtr->commit_lsn() : 0; if (!commit_lsn) /* Nothing to be done. */; else if (flush_log_later) |