diff options
author | heikki@hundin.mysql.fi <> | 2002-06-26 10:09:11 +0300 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2002-06-26 10:09:11 +0300 |
commit | 7a94fdd405d08eceefd4586d3b87e69be15f76de (patch) | |
tree | 8b4dd610ac12d96f65a83669362737ee54a35abf /innobase/os | |
parent | 38394ca17517db840b79e314a06c9f54169220a4 (diff) | |
download | mariadb-git-7a94fdd405d08eceefd4586d3b87e69be15f76de.tar.gz |
os0file.c:
Crash the server if file flush does not succeed: the database can get corrupt, better to crash it than let it run
Diffstat (limited to 'innobase/os')
-rw-r--r-- | innobase/os/os0file.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 5806cb8f1f3..e98b9e95cf7 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -761,6 +761,10 @@ os_file_flush( 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); #else int ret; @@ -783,11 +787,17 @@ os_file_flush( return(TRUE); } + ut_print_timestamp(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); + /* 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); #endif } @@ -1144,8 +1154,8 @@ os_file_write( "InnoDB: Operating system error number %lu.\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", - name, offset_high, offset, n, ret, (ulint)errno); - + name, offset_high, offset, n, (ulint)ret, + (ulint)errno); os_has_said_disk_full = TRUE; } |