mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
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:
parent
1ac03fd914
commit
768a736174
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue