-C Replace\sthe\srandomHex()\sfunction\swith\sseparate\sfunctions\nrandomBlob()\sand\shex().\s(CVS\s3620)
-D 2007-01-29T17:58:28
+C Fixed\sincorrect\stypecast\sfor\sflock\sstructure\sptr\sin\sfcntl()\scall\sin\ssqlite3TestLockingStyle()\nRestored\sprevious\sfullfsync\sbehavior,\stry\sfsync()\sif\sfcntl(fd,\sF_FULLFSYNC,\s0)\sreturns\san\serror.\s(CVS\s3621)
+D 2007-01-31T23:37:08
F Makefile.in 7fa74bf4359aa899da5586e394d17735f221315f
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/os_os2.h e5f17dd69333632bbc3112881ea407c37d245eb3
F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
-F src/os_unix.c 9fbbd8ab0a6b3992370ba0f3aae11feff2a78c96
+F src/os_unix.c 09d422370948fb5087a2873ac81470ef2f943559
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
F src/os_win.c 8736cf3a49fd651a6538857480f302807d57814c
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P a6001589ab1349f7a6b4af941e9e0fd73d13c1c0
-R 81b8a9e1e2346eee4d0809c0a57c1d63
-U drh
-Z e549908b92c57478539350b74a145cc3
+P f5ad74a9bc57e83c11beb3cf46bb6cd8c9de3f86
+R d922c31b26825f5a2b46c299309ad84f
+U aswift
+Z e656fc55ef70643d3663c6aa79db09b7
lockInfo.l_whence = SEEK_SET;
lockInfo.l_type = F_RDLCK;
- if (fcntl(fd, F_GETLK, (int) &lockInfo) != -1) {
+ if (fcntl(fd, F_GETLK, &lockInfo) != -1) {
return posixLockingStyle;
}
#if HAVE_FULLFSYNC
if( fullSync ){
rc = fcntl(fd, F_FULLFSYNC, 0);
- }else
-#endif /* HAVE_FULLFSYNC */
+ }else{
+ rc = 1;
+ }
+ /* If the FULLFSYNC failed, fall back to attempting an fsync().
+ * It shouldn't be possible for fullfsync to fail on the local
+ * file system (on OSX), so failure indicates that FULLFSYNC
+ * isn't supported for this file system. So, attempt an fsync
+ * and (for now) ignore the overhead of a superfluous fcntl call.
+ * It'd be better to detect fullfsync support once and avoid
+ * the fcntl call every time sync is called.
+ */
+ if( rc ) rc = fsync(fd);
+
+#else
if( dataOnly ){
rc = fdatasync(fd);
}else{
rc = fsync(fd);
}
+#endif /* HAVE_FULLFSYNC */
#endif /* defined(SQLITE_NO_SYNC) */
return rc;