diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2016-12-30 08:56:13 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2016-12-30 08:56:13 +0200 |
commit | 970f17cbfc8825a39d10a6dec0bb7d8c432a9b3e (patch) | |
tree | 2f285ed9e12c27a63e9fb99012ecfc5dca0a3929 /storage/innobase/os | |
parent | 341c375d4bddf0e5c381954606ca18be3b8c55e0 (diff) | |
parent | 23cc1be270c7304963643947d8e5ab88f4e312ee (diff) | |
download | mariadb-git-970f17cbfc8825a39d10a6dec0bb7d8c432a9b3e.tar.gz |
Merge 10.1 into 10.2
Diffstat (limited to 'storage/innobase/os')
-rw-r--r-- | storage/innobase/os/os0file.cc | 20 | ||||
-rw-r--r-- | storage/innobase/os/os0thread.cc | 4 |
2 files changed, 9 insertions, 15 deletions
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index de9b347b4ec..8e9139026d0 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -5910,22 +5910,18 @@ os_file_get_last_error( return(os_file_get_last_error_low(report_all_errors, false)); } -/** Does error handling when a file operation fails. -Conditionally exits (calling srv_fatal_error()) based on should_exit value -and the error type, if should_exit is true then on_error_silent is ignored. +/** Handle errors for file operations. @param[in] name name of a file or NULL @param[in] operation operation -@param[in] should_exit call srv_fatal_error() on an unknown error, - if this parameter is true -@param[in] on_error_silent if true then don't print any message to the log - iff it is an unknown non-fatal error +@param[in] should_abort whether to abort on an unknown error +@param[in] on_error_silent whether to suppress reports of non-fatal errors @return true if we should retry the operation */ static MY_ATTRIBUTE((warn_unused_result)) bool os_file_handle_error_cond_exit( const char* name, const char* operation, - bool should_exit, + bool should_abort, bool on_error_silent) { ulint err; @@ -5986,17 +5982,17 @@ os_file_handle_error_cond_exit( is better to ignore on_error_silent and print an error message to the log. */ - if (should_exit || !on_error_silent) { + if (should_abort || !on_error_silent) { ib::error() << "File " << (name != NULL ? name : "(unknown)") << ": '" << operation << "'" " returned OS error " << err << "." - << (should_exit + << (should_abort ? " Cannot continue operation" : ""); } - if (should_exit) { - srv_fatal_error(); + if (should_abort) { + abort(); } } diff --git a/storage/innobase/os/os0thread.cc b/storage/innobase/os/os0thread.cc index edc9c8e9406..0ee789df7b9 100644 --- a/storage/innobase/os/os0thread.cc +++ b/storage/innobase/os/os0thread.cc @@ -153,9 +153,7 @@ os_thread_create_func( int ret = pthread_create(&new_thread_id, &attr, func, arg); - if (ret != 0) { - ib::fatal() << "pthread_create returned " << ret; - } + ut_a(ret == 0); pthread_attr_destroy(&attr); |