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 96d77a34
......@@ -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
......
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