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>
This commit is contained in:
Sam James 2025-06-09 09:35:02 +01:00
parent a2cfc1b89b
commit da2c810401
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
3 changed files with 26 additions and 0 deletions

View File

@ -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

View File

@ -227,6 +227,7 @@ src_prepare() {
eapply "${FILESDIR}"/${PN}-10.6.11-gssapi.patch
eapply "${FILESDIR}"/${PN}-10.6.12-gcc-13.patch
eapply "${WORKDIR}"/${PN}-10.6-columnstore-with-boost-1.85.patch
eapply "${FILESDIR}"/${PN}-10.6.21-debug.patch
eapply_user

View File

@ -227,6 +227,7 @@ src_prepare() {
eapply "${FILESDIR}"/${PN}-10.6.11-gssapi.patch
eapply "${FILESDIR}"/${PN}-10.6.12-gcc-13.patch
eapply "${WORKDIR}"/${PN}-10.6-columnstore-with-boost-1.85.patch
eapply "${FILESDIR}"/${PN}-10.6.21-debug.patch
eapply_user