os0file.c:

  Crash the server if file flush does not succeed: the database can get corrupt, better to crash it than let it run
parent 38394ca1
...@@ -761,6 +761,10 @@ os_file_flush( ...@@ -761,6 +761,10 @@ os_file_flush(
os_file_handle_error(file, NULL); os_file_handle_error(file, NULL);
/* It is a fatal error if a file flush does not succeed, because then
the database can get corrupt on disk */
ut_a(0);
return(FALSE); return(FALSE);
#else #else
int ret; int ret;
...@@ -783,11 +787,17 @@ os_file_flush( ...@@ -783,11 +787,17 @@ os_file_flush(
return(TRUE); return(TRUE);
} }
ut_print_timestamp(stderr);
fprintf(stderr, fprintf(stderr,
"InnoDB: Error: the OS said file flush did not succeed\n"); " InnoDB: Error: the OS said file flush did not succeed\n");
os_file_handle_error(file, NULL); os_file_handle_error(file, NULL);
/* It is a fatal error if a file flush does not succeed, because then
the database can get corrupt on disk */
ut_a(0);
return(FALSE); return(FALSE);
#endif #endif
} }
...@@ -1144,8 +1154,8 @@ os_file_write( ...@@ -1144,8 +1154,8 @@ os_file_write(
"InnoDB: Operating system error number %lu.\n" "InnoDB: Operating system error number %lu.\n"
"InnoDB: Check that your OS and file system support files of this size.\n" "InnoDB: Check that your OS and file system support files of this size.\n"
"InnoDB: Check also the disk is not full or a disk quota exceeded.\n", "InnoDB: Check also the disk is not full or a disk quota exceeded.\n",
name, offset_high, offset, n, ret, (ulint)errno); name, offset_high, offset, n, (ulint)ret,
(ulint)errno);
os_has_said_disk_full = TRUE; os_has_said_disk_full = 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