aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-02-04 09:48:12 +0000
committerdrh <drh@noemail.net>2016-02-04 09:48:12 +0000
commit6d258995e65e606f65b9189c409801c3da01f4ef (patch)
tree688a6da9a25df1148f55fb101e7a3c6c880986f2 /src/os_unix.c
parentfabe393da8f09bee7f40781e2bae9edacebe8619 (diff)
downloadsqlite-6d258995e65e606f65b9189c409801c3da01f4ef.tar.gz
sqlite-6d258995e65e606f65b9189c409801c3da01f4ef.zip
Refinements to synchronous logic:
(1) Use PAGER_SYNCHRONOUS_FULL rather than the corresponding magic number. (2) Honor SQLITE_NO_SYNC on xDelete calls with sync (3) Count xDelete syncs during testing (4) Fix #ifs on SQLITE_EXTRA_DURABLE so that directory syncs on journal unlink are off by default. FossilOrigin-Name: e3157cb5ad0d22758e766a95fb1463a7810f7d7f
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 81422f215..fe1fc6af1 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5887,12 +5887,7 @@ static int unixDelete(
int fd;
rc = osOpenDirectory(zPath, &fd);
if( rc==SQLITE_OK ){
-#if OS_VXWORKS
- if( fsync(fd)==-1 )
-#else
- if( fsync(fd) )
-#endif
- {
+ if( full_fsync(fd,0,0) ){
rc = unixLogError(SQLITE_IOERR_DIR_FSYNC, "fsync", zPath);
}
robust_close(0, fd, __LINE__);
@@ -6936,7 +6931,7 @@ static int proxyTakeConch(unixFile *pFile){
writeSize = PROXY_PATHINDEX + strlen(&writeBuffer[PROXY_PATHINDEX]);
robust_ftruncate(conchFile->h, writeSize);
rc = unixWrite((sqlite3_file *)conchFile, writeBuffer, writeSize, 0);
- fsync(conchFile->h);
+ full_fsync(conchFile->h,0,0);
/* If we created a new conch file (not just updated the contents of a
** valid conch file), try to match the permissions of the database
*/