mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Change the SQLITE_NO_SYNC compile-time option to call fstat() in place of
fsync() rather than being a total no-op. FossilOrigin-Name: f64ea8a052af9790d5e6987cbd5e81d77da6f172
This commit is contained in:
@@ -3391,10 +3391,15 @@ static int full_fsync(int fd, int fullSync, int dataOnly){
|
||||
#endif
|
||||
|
||||
/* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a
|
||||
** no-op
|
||||
** no-op. But go ahead and call fstat() to validate the file
|
||||
** descriptor as we need a method to provoke a failure during
|
||||
** coverate testing.
|
||||
*/
|
||||
#ifdef SQLITE_NO_SYNC
|
||||
rc = SQLITE_OK;
|
||||
{
|
||||
struct stat buf;
|
||||
rc = osFstat(fd, &buf);
|
||||
}
|
||||
#elif HAVE_FULLFSYNC
|
||||
if( fullSync ){
|
||||
rc = osFcntl(fd, F_FULLFSYNC, 0);
|
||||
|
||||
Reference in New Issue
Block a user