/ Check-in [a9b341dc]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Optionally call fdatasync() instead of fsync() only if _POSIX_SYNCHRONIZED_IO is positive, which should only be the case on operating systems that actually support fdatasync(). (CVS 2732)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a9b341dccffaf324a64139d6f482599258ef7009
User & Date: drh 2005-09-22 15:45:04
Context
2005-09-23
21:11
Fix an uninitialized structure member that was causing a malfunction when you used deeply nested and very complex views. Ticket #1449. (CVS 2733) check-in: 352cc9f5 user: drh tags: trunk
2005-09-22
15:45
Optionally call fdatasync() instead of fsync() only if _POSIX_SYNCHRONIZED_IO is positive, which should only be the case on operating systems that actually support fdatasync(). (CVS 2732) check-in: a9b341dc user: drh tags: trunk
2005-09-20
18:13
Add VM code comments on the group-by processing. Extra group-by test case. (CVS 2731) check-in: 655e75ac user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

824
825
826
827
828
829
830
831

832
833
834


835
836
837
838
839
840
841
    rc = fcntl(fd, F_FULLFSYNC, 0);
  }else{
    rc = 1;
  }
  /* If the FULLSYNC failed, try to do a normal fsync() */
  if( rc ) rc = fsync(fd);

#else

  if( dataOnly ){
    rc = fdatasync(fd);
  }else{


    rc = fsync(fd);
  }
#endif /* defined(F_FULLFSYNC) */
#endif /* defined(SQLITE_NO_SYNC) */

  return rc;
}







|
>


|
>
>







824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
    rc = fcntl(fd, F_FULLFSYNC, 0);
  }else{
    rc = 1;
  }
  /* If the FULLSYNC failed, try to do a normal fsync() */
  if( rc ) rc = fsync(fd);

#else /* if !defined(F_FULLSYNC) */
#if  defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO>0
  if( dataOnly ){
    rc = fdatasync(fd);
  }else
#endif /* _POSIX_SYNCHRONIZED_IO > 0 */
  {
    rc = fsync(fd);
  }
#endif /* defined(F_FULLFSYNC) */
#endif /* defined(SQLITE_NO_SYNC) */

  return rc;
}