mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 19:41:47 +01:00
branches/zip: Fix a bug in the sync debug code where a lock with level
SYNC_LEVEL_VARYING would cause an assertion failure when a thread tried to release it. We still have to check because it's a varying lock and could have been added later, so if the lookup fails then we simply ignore it and return TRUE.
This commit is contained in:
parent
1ba7f40775
commit
2a1e67ff63
1 changed files with 12 additions and 0 deletions
|
@ -1224,6 +1224,18 @@ sync_thread_reset_level(
|
|||
}
|
||||
}
|
||||
|
||||
if (((mutex_t*) latch)->magic_n != MUTEX_MAGIC_N) {
|
||||
rw_lock_t* rw_lock;
|
||||
|
||||
rw_lock = (rw_lock_t*) latch;
|
||||
|
||||
if (rw_lock->level == SYNC_LEVEL_VARYING) {
|
||||
mutex_exit(&sync_thread_mutex);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
ut_error;
|
||||
|
||||
mutex_exit(&sync_thread_mutex);
|
||||
|
|
Loading…
Add table
Reference in a new issue