Skip to content

Commit 789a2a3

Browse files
committed
fixup 0a67b15
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).
1 parent b797f21 commit 789a2a3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

storage/innobase/trx/trx0trx.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,13 @@ trx_t *trx_create()
362362
/** Free the memory to trx_pools */
363363
void trx_t::free()
364364
{
365+
#ifdef HAVE_MEM_CHECK
366+
if (xid.is_null())
367+
MEM_MAKE_DEFINED(&xid, sizeof xid);
368+
else
369+
MEM_MAKE_DEFINED(&xid.data[xid.gtrid_length + xid.bqual_length],
370+
sizeof xid.data - (xid.gtrid_length + xid.bqual_length));
371+
#endif
365372
MEM_CHECK_DEFINED(this, sizeof *this);
366373

367374
ut_ad(!n_mysql_tables_in_use);

0 commit comments

Comments
 (0)