Commit 8d31718c authored by unknown's avatar unknown

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
parent bdb9555d
...@@ -631,7 +631,21 @@ os_fast_mutex_free( ...@@ -631,7 +631,21 @@ os_fast_mutex_free(
DeleteCriticalSection((LPCRITICAL_SECTION) fast_mutex); DeleteCriticalSection((LPCRITICAL_SECTION) fast_mutex);
#else #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 #endif
if (os_sync_mutex_inited) { if (os_sync_mutex_inited) {
/* When freeing the last mutexes, we have /* When freeing the last mutexes, we have
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment