Skip to content

Commit

Permalink
fixup 0a67b15
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
dr-m committed Jul 3, 2021
1 parent b797f21 commit 789a2a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions storage/innobase/trx/trx0trx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 789a2a3

Please sign in to comment.