MDEV-32899 instrumentation fixup

dict_sys_t::lock(), dict_sys_t::freeze(): Assert that the current thread
is not holding dict_sys.latch in any mode. The SUX lock is reentrant,
but the simpler RW lock that we use in non-debug builds is not.
This commit is contained in:
Marko Mäkelä 2023-12-04 11:47:19 +02:00
parent 1ac03fd914
commit 768a736174

View file

@ -1512,6 +1512,7 @@ public:
void lock(SRW_LOCK_ARGS(const char *file, unsigned line))
{
#ifdef UNIV_DEBUG
ut_ad(!latch.have_any());
if (!latch.x_lock_try())
#else
if (!latch.wr_lock_try())
@ -1540,6 +1541,7 @@ public:
void freeze()
{
# ifdef UNIV_DEBUG
ut_ad(!latch.have_any());
latch.s_lock();
# else
latch.rd_lock();