diff options
author | danielk1977 <danielk1977@noemail.net> | 2007-08-20 05:36:51 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2007-08-20 05:36:51 +0000 |
commit | f036aef0619a1ec3c09b5ffd8f59c1d57686ada2 (patch) | |
tree | bfa0e78e671d48d5aadf6abb300ea4dd918cea02 /src/os_unix.c | |
parent | fee2d25a70c09737e02b7198498f8e7df5ab56f7 (diff) | |
download | sqlite-f036aef0619a1ec3c09b5ffd8f59c1d57686ada2.tar.gz sqlite-f036aef0619a1ec3c09b5ffd8f59c1d57686ada2.zip |
Fix full_fsync() related functionality broken as part of the migration to sqlite3_vfs. (CVS 4243)
FossilOrigin-Name: cb24cda179c2b526c5ac48be75e372d2b9db808c
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 6200ac1ae..15bf9d221 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1174,8 +1174,14 @@ static int unixSync(sqlite3_file *id, int flags){ int rc; unixFile *pFile = (unixFile*)id; - int isDataOnly = (flags & SQLITE_SYNC_DATAONLY); - int isFullsync = (flags & SQLITE_SYNC_FULL); + int isDataOnly = (flags&SQLITE_SYNC_DATAONLY); + int isFullsync = (flags&0x0F)==SQLITE_SYNC_FULL; + + /* Check that one of SQLITE_SYNC_NORMAL, FULL or BARRIER was passed */ + assert((flags&0x0F)==SQLITE_SYNC_NORMAL + || (flags&0x0F)==SQLITE_SYNC_FULL + || (flags&0x0F)==SQLITE_SYNC_BARRIER + ); assert( pFile ); OSTRACE2("SYNC %-3d\n", pFile->h); |