diff options
Diffstat (limited to 'storage/innobase/os/os0file.c')
-rw-r--r-- | storage/innobase/os/os0file.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c index 2907fddc33b..4a9d3334e7d 100644 --- a/storage/innobase/os/os0file.c +++ b/storage/innobase/os/os0file.c @@ -1330,9 +1330,19 @@ try_again: if (file == INVALID_HANDLE_VALUE) { *success = FALSE; - retry = os_file_handle_error(name, - create_mode == OS_FILE_CREATE ? - "create" : "open"); + /* When srv_file_per_table is on, file creation failure may not + be critical to the whole instance. Do not crash the server in + case of unknown errors. */ + if (srv_file_per_table) { + retry = os_file_handle_error_no_exit(name, + create_mode == OS_FILE_CREATE ? + "create" : "open"); + } else { + retry = os_file_handle_error(name, + create_mode == OS_FILE_CREATE ? + "create" : "open"); + } + if (retry) { goto try_again; } @@ -1407,9 +1417,19 @@ try_again: if (file == -1) { *success = FALSE; - retry = os_file_handle_error(name, - create_mode == OS_FILE_CREATE ? - "create" : "open"); + /* When srv_file_per_table is on, file creation failure may not + be critical to the whole instance. Do not crash the server in + case of unknown errors. */ + if (srv_file_per_table) { + retry = os_file_handle_error_no_exit(name, + create_mode == OS_FILE_CREATE ? + "create" : "open"); + } else { + retry = os_file_handle_error(name, + create_mode == OS_FILE_CREATE ? + "create" : "open"); + } + if (retry) { goto try_again; } else { |