diff options
author | unknown <heikki@hundin.mysql.fi> | 2005-10-03 00:05:50 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2005-10-03 00:05:50 +0300 |
commit | 8d31718c5b4fe27fbed8dddf034d595ed7cee9ed (patch) | |
tree | 563e08d6ee6c98b0a8c8fac9d83d4aa9351fb040 /innobase | |
parent | bdb9555dd646b15cf632ff507ff86a4230603dc7 (diff) | |
download | mariadb-git-8d31718c5b4fe27fbed8dddf034d595ed7cee9ed.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.c | 16 |
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 |