Skip to content
Permalink
Browse files
MDEV-14477 InnoDB update_time is wrongly updated after partial rollba…
…ck 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.
  • Loading branch information
Sergey Vojtovich committed Dec 22, 2017
1 parent 37f5569 commit 1464f48
Showing 1 changed file with 2 additions and 7 deletions.
@@ -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(

0 comments on commit 1464f48

Please sign in to comment.