Commit f6dad493 authored by unknown's avatar unknown

os0file.c Added better error message if disk is full; calls exit(1)


innobase/os/os0file.c:
  Added better error message if disk is full; calls exit(1)
parent 94f07da7
...@@ -163,7 +163,6 @@ os_file_handle_error( ...@@ -163,7 +163,6 @@ os_file_handle_error(
os_file_t file, /* in: file pointer */ os_file_t file, /* in: file pointer */
char* name) /* in: name of a file or NULL */ char* name) /* in: name of a file or NULL */
{ {
int input_char;
ulint err; ulint err;
UT_NOT_USED(file); UT_NOT_USED(file);
...@@ -172,32 +171,19 @@ os_file_handle_error( ...@@ -172,32 +171,19 @@ os_file_handle_error(
if (err == OS_FILE_DISK_FULL) { if (err == OS_FILE_DISK_FULL) {
ask_again: ask_again:
printf("\n"); fprintf(stderr, "\n");
if (name) { if (name) {
printf( fprintf(stderr,
"Innobase encountered a problem with file %s.\n", "InnoDB: Encountered a problem with file %s.\n",
name); name);
} }
printf("Disk is full. Try to clean the disk to free space\n"); fprintf(stderr,
printf("before answering the following: How to continue?\n"); "InnoDB: Cannot continue operation.\n"
printf("(Y == freed some space: try again)\n"); "InnoDB: Disk is full. Try to clean the disk to free space.\n"
printf("(N == crash the database: will restart it)?\n"); "InnoDB: Delete possible created file %s and restart.\n");
ask_with_no_question:
input_char = getchar();
if (input_char == (int) 'N') { exit(1);
ut_error;
return(FALSE);
} else if (input_char == (int) 'Y') {
return(TRUE);
} else if (input_char == (int) '\n') {
goto ask_with_no_question;
} else {
goto ask_again;
}
} else if (err == OS_FILE_AIO_RESOURCES_RESERVED) { } else if (err == OS_FILE_AIO_RESOURCES_RESERVED) {
return(TRUE); return(TRUE);
......
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