diff options
-rw-r--r-- | storage/innobase/os/os0thread.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/storage/innobase/os/os0thread.cc b/storage/innobase/os/os0thread.cc index 792d9cc4e10..ed3f1a13f42 100644 --- a/storage/innobase/os/os0thread.cc +++ b/storage/innobase/os/os0thread.cc @@ -143,7 +143,13 @@ os_thread_create_func( pthread_attr_t attr; #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 #ifdef UNIV_AIX @@ -171,7 +177,11 @@ os_thread_create_func( #else ret = pthread_create(&pthread, &attr, func, arg); #endif - ut_a(ret == 0); + if (UNIV_UNLIKELY(ret)) { + fprintf(stderr, + "InnoDB: Error: pthread_create() returned %d\n", ret); + exit(1); + } #ifndef UNIV_HPUX10 pthread_attr_destroy(&attr); |