summaryrefslogtreecommitdiff
path: root/storage/innobase/os
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-18 12:32:10 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-18 12:32:10 +0200
commit00572a0b0cc81c38f198adcc5582260a98f3eebf (patch)
tree19085d651d18b90df2d8755fd0142df3df1931e7 /storage/innobase/os
parent1d728a98d8c4626098db9876de101d8cf704c993 (diff)
downloadmariadb-git-00572a0b0cc81c38f198adcc5582260a98f3eebf.tar.gz
MDEV-17482 InnoDB fails to say which fatal error fsync() returned
os_file_fsync_posix(): If fsync() returns a fatal error, do include errno in the error message. In the future, we might handle fsync() or write or allocation failures on InnoDB data files a little more gracefully: flag the affected index or table as corrupted, and deny any subsequent writes to the table. If a write to the undo log or redo log fails, an alternative to killing the server could be to deny any writes to InnoDB tables until the server has been restarted.
Diffstat (limited to 'storage/innobase/os')
-rw-r--r--storage/innobase/os/os0file.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index bb6a06240af..10a8f44b062 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -2495,18 +2495,10 @@ os_file_fsync_posix(
ut_a(failures < 2000);
break;
- case EIO:
- ib::error() << "fsync() returned EIO, aborting";
- /* fall through */
default:
- ut_error;
- break;
+ ib::fatal() << "fsync() returned " << errno;
}
}
-
- ut_error;
-
- return(-1);
}
/** Check the existence and type of the given file.