Commit 70209769 authored by calvin's avatar calvin

branches/zip: fix bug#47055 unconditional exit(1) on ERROR_WORKING_SET_QUOTA

1453 (0x5AD) for InnoDB backend

When error ERROR_WORKING_SET_QUOTA or ERROR_NO_SYSTEM_RESOURCES
occurs, yields for 100ms and retries the operation.

Approved by: Heikki (on IM)
parent 4cc35ffc
......@@ -157,6 +157,7 @@ log. */
to become available again */
#define OS_FILE_SHARING_VIOLATION 76
#define OS_FILE_ERROR_NOT_SPECIFIED 77
#define OS_FILE_INSUFFICIENT_RESOURCE 78
/* @} */
/** Types for aio operations @{ */
......
......@@ -317,6 +317,12 @@ os_file_get_last_error(
" software or another instance\n"
"InnoDB: of MySQL."
" Please close it to get rid of this error.\n");
} else if (err == ERROR_WORKING_SET_QUOTA
|| err == ERROR_NO_SYSTEM_RESOURCES) {
fprintf(stderr,
"InnoDB: The error means that there are no"
" sufficient system resources or quota to"
" complete the operation.\n");
} else {
fprintf(stderr,
"InnoDB: Some operating system error numbers"
......@@ -338,6 +344,9 @@ os_file_get_last_error(
} else if (err == ERROR_SHARING_VIOLATION
|| err == ERROR_LOCK_VIOLATION) {
return(OS_FILE_SHARING_VIOLATION);
} else if (err == ERROR_WORKING_SET_QUOTA
|| err == ERROR_NO_SYSTEM_RESOURCES) {
return(OS_FILE_INSUFFICIENT_RESOURCE);
} else {
return(100 + err);
}
......@@ -456,6 +465,10 @@ os_file_handle_error_cond_exit(
os_thread_sleep(10000000); /* 10 sec */
return(TRUE);
} else if (err == OS_FILE_INSUFFICIENT_RESOURCE) {
os_thread_sleep(100000); /* 100 ms */
return(TRUE);
} else {
if (name) {
fprintf(stderr, "InnoDB: File name %s\n", name);
......
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