summaryrefslogtreecommitdiff
path: root/storage/innobase/trx
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-04-24 20:59:57 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-04-24 20:59:57 +0300
commit7396dfcca7a1eb906edabec02fb59d168f09343d (patch)
tree5971546f2d27f5a8dc186e0f63ae3d2ac9208a6a /storage/innobase/trx
parentf79c5a658cc33a10d7744a748a4328254e2cbaf7 (diff)
parent7b5543b21d31bd1517b49c2524a05b5b83fd9691 (diff)
downloadmariadb-git-7396dfcca7a1eb906edabec02fb59d168f09343d.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'storage/innobase/trx')
-rw-r--r--storage/innobase/trx/trx0trx.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index 9b3e67a9043..b50ea77a797 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -490,6 +490,14 @@ void trx_free(trx_t*& trx)
ut_ad(trx->will_lock == 0);
trx_pools->mem_free(trx);
+ /* Unpoison the memory for innodb_monitor_set_option;
+ it is operating also on the freed transaction objects. */
+ MEM_UNDEFINED(&trx->mutex, sizeof trx->mutex);
+ MEM_UNDEFINED(&trx->undo_mutex, sizeof trx->undo_mutex);
+ /* Declare the contents as initialized for Valgrind;
+ we checked that it was initialized in trx_pools->mem_free(trx). */
+ UNIV_MEM_VALID(&trx->mutex, sizeof trx->mutex);
+ UNIV_MEM_VALID(&trx->undo_mutex, sizeof trx->undo_mutex);
trx = NULL;
}