Commit 1464f480 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-14477 InnoDB update_time is wrongly updated after partial rollback or internal COMMIT

This is partial revert of original patch.

Read-only transactions that modified temporary tables are added to
trx_sys_t::rw_trx_ids and trx_sys_t::rw_trx_set. However with patch for
MDEV-14477 they were not removed.

Restore old behaviour in this regard.
parent 37f55699
......@@ -1728,12 +1728,7 @@ trx_commit_in_memory(
trx->state = TRX_STATE_NOT_STARTED;
} else {
const bool rw = trx->rsegs.m_redo.rseg != NULL;
ut_ad(!trx->read_only || !rw);
ut_ad(trx->id || !rw);
if (rw) {
if (trx->id > 0) {
/* For consistent snapshot, we need to remove current
transaction from running transaction id list for mvcc
before doing commit and releasing locks. */
......@@ -1748,7 +1743,7 @@ trx_commit_in_memory(
ut_ad(trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY));
DEBUG_SYNC_C("after_trx_committed_in_memory");
if (!rw) {
if (trx->read_only || trx->rsegs.m_redo.rseg == NULL) {
MONITOR_INC(MONITOR_TRX_RO_COMMIT);
if (trx->read_view != NULL) {
trx_sys->mvcc->view_close(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment