summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2017-12-21 18:04:59 +0400
committerSergey Vojtovich <svoj@mariadb.org>2017-12-22 14:09:24 +0400
commit1464f4808c08155fd10ba09eae2bb2c3f177482c (patch)
treef40f1a5da935a96aacc0a32184ea558e3dc06573
parent37f5569909d2b5a80e7f55b7b5d38d25ee2f0b5e (diff)
downloadmariadb-git-1464f4808c08155fd10ba09eae2bb2c3f177482c.tar.gz
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.
-rw-r--r--storage/innobase/trx/trx0trx.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index 986eb760cef..fde7443394e 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -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(