diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-07-03 20:35:29 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-07-03 20:35:29 +0300 |
commit | 789a2a363aa576af22fec412a6724140955978b5 (patch) | |
tree | dfda50c91eef573535364fc26b9f019f86ac214d | |
parent | b797f217a3c908c180bbfda9c22b2c7b2815947c (diff) | |
download | mariadb-git-789a2a363aa576af22fec412a6724140955978b5.tar.gz |
fixup 0a67b15a9d3348d10f6df0caae6f2f973295a43a
trx_t::free(): Declare xid as fully initialized in order to
avoid tripping the subsequent MEM_CHECK_DEFINED
(in WITH_MSAN and WITH_VALGRIND builds).
-rw-r--r-- | storage/innobase/trx/trx0trx.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index 3ff09395d36..66ca04bbf04 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -362,6 +362,13 @@ trx_t *trx_create() /** Free the memory to trx_pools */ void trx_t::free() { +#ifdef HAVE_MEM_CHECK + if (xid.is_null()) + MEM_MAKE_DEFINED(&xid, sizeof xid); + else + MEM_MAKE_DEFINED(&xid.data[xid.gtrid_length + xid.bqual_length], + sizeof xid.data - (xid.gtrid_length + xid.bqual_length)); +#endif MEM_CHECK_DEFINED(this, sizeof *this); ut_ad(!n_mysql_tables_in_use); |