diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-01-05 10:42:19 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-01-05 10:42:19 +0200 |
commit | 758af98ff7c47cc1fb5debdc138312fa389d528f (patch) | |
tree | b673fcf7aee9723bbb7decd01a5bd6d9f3519520 /storage/innobase | |
parent | ffb38c9771bc7248482dc6a3d2f26ca10fe09a9b (diff) | |
download | mariadb-git-758af98ff7c47cc1fb5debdc138312fa389d528f.tar.gz |
Post-push fix for Part 1 of MDEV-8139 Fix scrubbing tests
In the backport of Bug#24450908 UNDO LOG EXISTS AFTER SLOW SHUTDOWN
from MySQL 5.7 to the MySQL 5.6 based MariaDB Server 10.1, we must
use a mutex when HAVE_ATOMIC_BUILTINS is not defined.
Also, correct a function comment. In MySQL 5.6 and MariaDB Server 10.1,
also temporary InnoDB tables are redo-logged.
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/trx/trx0purge.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index 42b94d9b6a3..b3d16546a63 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -294,15 +294,19 @@ trx_purge_remove_log_hdr( { flst_remove(rseg_hdr + TRX_RSEG_HISTORY, log_hdr + TRX_UNDO_HISTORY_NODE, mtr); - +#ifdef HAVE_ATOMIC_BUILTINS os_atomic_decrement_ulint(&trx_sys->rseg_history_len, 1); +#else + mutex_enter(&trx_sys->mutex); + --trx_sys->rseg_history_len; + mutex_exit(&trx_sys->mutex); +#endif } /** Frees an undo log segment which is in the history list. Removes the undo log hdr from the history list. @param[in,out] rseg rollback segment -@param[in] hdr_addr file address of log_hdr -@param[in] noredo skip redo logging. */ +@param[in] hdr_addr file address of log_hdr */ static void trx_purge_free_segment( |