summaryrefslogtreecommitdiff
path: root/dev-db/mariadb/files/mariadb-10.6.21-debug.patch
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2025-06-09 09:35:02 +0100
committerSam James <sam@gentoo.org>2025-06-09 09:35:02 +0100
commitda2c810401729b1a07b7ab94d09a4214c064c951 (patch)
tree5d96dc365781d0550443a2c4aba7eb5f7c193af9 /dev-db/mariadb/files/mariadb-10.6.21-debug.patch
parenta2cfc1b89b7d078cd66cdb1c7c865adf1591d672 (diff)
downloadgentoo-da2c810401729b1a07b7ab94d09a4214c064c951.tar.gz
gentoo-da2c810401729b1a07b7ab94d09a4214c064c951.tar.bz2
gentoo-da2c810401729b1a07b7ab94d09a4214c064c951.zip
dev-db/mariadb: fix build w/ USE=-debug
Not an ideal fix (see upstream bugs for discussion) without a bit more investigation on the bigger problem but this is the lesser evil. Closes: https://bugs.gentoo.org/949720 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-db/mariadb/files/mariadb-10.6.21-debug.patch')
-rw-r--r--dev-db/mariadb/files/mariadb-10.6.21-debug.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/dev-db/mariadb/files/mariadb-10.6.21-debug.patch b/dev-db/mariadb/files/mariadb-10.6.21-debug.patch
new file mode 100644
index 000000000000..ec8ae7617c12
--- /dev/null
+++ b/dev-db/mariadb/files/mariadb-10.6.21-debug.patch
@@ -0,0 +1,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