From 1ffb70a3092f1fb97b00fabf53c565cc4aaf558a Mon Sep 17 00:00:00 2001 From: Sunny Bains Date: Wed, 26 Jan 2011 09:33:59 +1100 Subject: [PATCH] In sync_close() fix a bug introduced by the fix for Bug #59683 where we iterate over the mutex list and free each mutex. When UNIV_MEM_DEBUG is defined, we need skip the hash mutex. It is a minor bug affecting only UNIV_SYNC_DEBUG builds, found by Michael. --- storage/innobase/sync/sync0sync.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c index 13d8ae9ed43..453314f465d 100644 --- a/storage/innobase/sync/sync0sync.c +++ b/storage/innobase/sync/sync0sync.c @@ -1506,7 +1506,7 @@ sync_close(void) for (mutex = UT_LIST_GET_FIRST(mutex_list); mutex != NULL; - mutex = UT_LIST_GET_FIRST(mutex_list)) { + /* No op */) { #ifdef UNIV_MEM_DEBUG if (mutex == &mem_hash_mutex) { @@ -1516,6 +1516,8 @@ sync_close(void) #endif /* UNIV_MEM_DEBUG */ mutex_free(mutex); + + mutex = UT_LIST_GET_FIRST(mutex_list); } mutex_free(&mutex_list_mutex);