diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-05-04 18:19:13 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-05-04 18:31:30 +0300 |
commit | 5e7e7153b439ea1b12588f5830d66b3a0cf13414 (patch) | |
tree | bd3751b69f9470f1b9b9f26cc301c340ca70d293 /storage/innobase/trx/trx0trx.cc | |
parent | f5cff8980a7f55069b01dcc9e124880c75930c91 (diff) | |
download | mariadb-git-5e7e7153b439ea1b12588f5830d66b3a0cf13414.tar.gz |
MDEV-22452: Missing call to wsrep_commit_ordered in trx_t::commit()
This is a follow-up fix to the changes that were made in MDEV-7962.
assert_trx_is_free(): Assert !is_wsrep().
trx_init(): Do not initialize trx->wsrep, because it must have been
initialized already.
trx_t::commit_in_memory(): Invoke wsrep_commit_ordered(). This call
was being skipped, because the transaction object had already been
freed to the pool.
trx_rollback_for_mysql(), innobase_commit_low(),
innobase_close_connection(): Always reset trx->wsrep.
Diffstat (limited to 'storage/innobase/trx/trx0trx.cc')
-rw-r--r-- | storage/innobase/trx/trx0trx.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index 7c25d5b61c2..b1f88b1226f 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -109,9 +109,6 @@ trx_init( trx->state = TRX_STATE_NOT_STARTED; trx->is_recovered = false; -#ifdef WITH_WSREP - trx->wsrep = false; -#endif /* WITH_WSREP */ trx->op_info = ""; @@ -1504,6 +1501,17 @@ inline void trx_t::commit_in_memory(const mtr_t *mtr) DBUG_LOG("trx", "Commit in memory: " << this); state= TRX_STATE_NOT_STARTED; +#ifdef WITH_WSREP + /* Serialization history has been written and the transaction is + committed in memory, which makes this commit ordered. Release commit + order critical section. */ + if (wsrep) + { + wsrep= false; + wsrep_commit_ordered(mysql_thd); + } +#endif /* WITH_WSREP */ + assert_trx_is_free(this); trx_init(this); trx_mutex_exit(this); @@ -1581,13 +1589,6 @@ void trx_t::commit() local_mtr.start(); } commit_low(mtr); -#ifdef WITH_WSREP - /* Serialization history has been written and the transaction is - committed in memory, which makes this commit ordered. Release commit - order critical section. */ - if (mtr && is_wsrep()) - wsrep_commit_ordered(mysql_thd); -#endif /* WITH_WSREP */ } /****************************************************************//** |