summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2005-10-03 00:05:50 +0300
committerunknown <heikki@hundin.mysql.fi>2005-10-03 00:05:50 +0300
commit70cb4cf6950a1de41cbf769502009becf4f5d58b (patch)
tree563e08d6ee6c98b0a8c8fac9d83d4aa9351fb040 /innobase
parent5f172375d49487aff754a666a91b9db51d1e6ebb (diff)
downloadmariadb-git-70cb4cf6950a1de41cbf769502009becf4f5d58b.tar.gz
os0sync.c:
Add diagnostic code to track an assertion failure of 0 == pthread_mutex_destroy(); this was reported on the MySQL mailing list Sept 23, 2005 innobase/os/os0sync.c: Add diagnostic code to track an assertion failure of 0 == pthread_mutex_destroy(); this was reported on the MySQL mailing list Sept 23, 2005
Diffstat (limited to 'innobase')
-rw-r--r--innobase/os/os0sync.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/innobase/os/os0sync.c b/innobase/os/os0sync.c
index 18d92af5054..4ad9473fe66 100644
--- a/innobase/os/os0sync.c
+++ b/innobase/os/os0sync.c
@@ -631,7 +631,21 @@ os_fast_mutex_free(
DeleteCriticalSection((LPCRITICAL_SECTION) fast_mutex);
#else
- ut_a(0 == pthread_mutex_destroy(fast_mutex));
+ int ret;
+
+ ret = pthread_mutex_destroy(fast_mutex);
+
+ if (ret != 0) {
+ ut_print_timestamp(stderr);
+ fprintf(stderr,
+" InnoDB: error: return value %lu when calling\n"
+"InnoDB: pthread_mutex_destroy().\n", (ulint)ret);
+ fprintf(stderr,
+"InnoDB: Byte contents of the pthread mutex at %p:\n", fast_mutex);
+ ut_print_buf(stderr, (const byte*)fast_mutex,
+ sizeof(os_fast_mutex_t));
+ fprintf(stderr, "\n");
+ }
#endif
if (os_sync_mutex_inited) {
/* When freeing the last mutexes, we have