Commit 6fe2aae3 authored by Eugene Kosov's avatar Eugene Kosov

InnoDB: log unsuccessful calls to pthread_attr_init() and pthread_create() before crash

parent 2855edf9
...@@ -143,7 +143,13 @@ os_thread_create_func( ...@@ -143,7 +143,13 @@ os_thread_create_func(
pthread_attr_t attr; pthread_attr_t attr;
#ifndef UNIV_HPUX10 #ifndef UNIV_HPUX10
pthread_attr_init(&attr); ret = pthread_attr_init(&attr);
if (UNIV_UNLIKELY(ret)) {
fprintf(stderr,
"InnoDB: Error: pthread_attr_init() returned %d\n",
ret);
exit(1);
}
#endif #endif
#ifdef UNIV_AIX #ifdef UNIV_AIX
...@@ -171,7 +177,11 @@ os_thread_create_func( ...@@ -171,7 +177,11 @@ os_thread_create_func(
#else #else
ret = pthread_create(&pthread, &attr, func, arg); ret = pthread_create(&pthread, &attr, func, arg);
#endif #endif
ut_a(ret == 0); if (UNIV_UNLIKELY(ret)) {
fprintf(stderr,
"InnoDB: Error: pthread_create() returned %d\n", ret);
exit(1);
}
#ifndef UNIV_HPUX10 #ifndef UNIV_HPUX10
pthread_attr_destroy(&attr); pthread_attr_destroy(&attr);
......
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