Commit 8d31718c authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -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