blob: ec8ae7617c128aa0c512389cf77830022a125bd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
https://bugs.gentoo.org/949720
https://jira.mariadb.org/browse/MDEV-36036
https://jira.mariadb.org/browse/MDEV-36113
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -671,14 +671,18 @@
{
ut_ad(!mutex_is_owner());
mutex.wr_lock();
+#ifdef UNIV_DEBUG
assert(!mutex_owner.exchange(pthread_self(),
std::memory_order_relaxed));
+#endif /* UNIV_DEBUG */
}
/** Release the mutex */
void mutex_unlock()
{
+#ifdef UNIV_DEBUG
assert(mutex_owner.exchange(0, std::memory_order_relaxed) ==
pthread_self());
+#endif /* UNIV_DEBUG */
mutex.wr_unlock();
}
#ifndef SUX_LOCK_GENERIC
|