maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08408
[GSoC CONC] Non trivial patch
diff --git a/libmariadb/dbug.c b/libmariadb/dbug.c
index fb7c52b..9855f97 100644
--- a/libmariadb/dbug.c
+++ b/libmariadb/dbug.c
@@ -428,9 +428,9 @@ static void read_lock_stack(CODE_STATE *cs)
*/
static void unlock_stack(CODE_STATE *cs)
{
- if (cs->stack == &init_settings)
+ if (cs->stack == &init_settings && --(cs->m_read_lock_count) == 0)
{
- if (--(cs->m_read_lock_count) == 0)
+
pthread_mutex_unlock(&THR_LOCK_init_settings);
}
}
Follow ups