From: danielk1977 Date: Fri, 25 Nov 2005 08:47:57 +0000 (+0000) Subject: Check the return code of full_fsync() when used to sync a directory fd. (CVS 2780) X-Git-Tag: version-3.6.10~3380 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0964b23a9914cfbbb6408936be61e95bdb4997c9;p=thirdparty%2Fsqlite.git Check the return code of full_fsync() when used to sync a directory fd. (CVS 2780) FossilOrigin-Name: 84aae3b0ae7381710ff0bc9881cbde3559bb580b --- diff --git a/manifest b/manifest index 089d1fdaac..2f8870688f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Preserve\s64-bit\slast\sinsert\srowids\sacross\striggers.\s(CVS\s2779) -D 2005-11-25T02:43:51 +C Check\sthe\sreturn\scode\sof\sfull_fsync()\swhen\sused\sto\ssync\sa\sdirectory\sfd.\s(CVS\s2780) +D 2005-11-25T08:47:57 F Makefile.in 7bed51530f32af7fe1945261c388d80998b39a12 F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -54,7 +54,7 @@ F src/os.h c51f2747f7bd1840447e2c7d26db749604626814 F src/os_common.h d74a11728ad2444b6b695b94c28c06881f049e49 F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3 -F src/os_unix.c 6878d8aeaa5ddd0c8e8c92b4c36b09c2080fc892 +F src/os_unix.c 0a75314cdd881e138a5da4d450102cf9ce9c1786 F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e F src/os_win.c fbccc85e7011174068c27d54256746321a1f0059 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b @@ -321,7 +321,7 @@ F www/tclsqlite.tcl ddcf912ea48695603c8ed7efb29f0812ef8d1b49 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 84aa4d58001ed943295f21f429c58c3c99b771d8 -R 70d5788f0bbefc851ca5be71e587e730 -U drh -Z 95428906cd2e78e3ce76462c301ac152 +P 4dd7cfaa587fd5f76a0b60db0f02d5f57f801564 +R dcb430a1ff23dd4c2334919a70d35887 +U danielk1977 +Z d513d006c2d7b8a589698409e9f38d6f diff --git a/manifest.uuid b/manifest.uuid index 4bb1240f96..0051c9c794 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4dd7cfaa587fd5f76a0b60db0f02d5f57f801564 \ No newline at end of file +84aae3b0ae7381710ff0bc9881cbde3559bb580b \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index ea44217afe..b37a90794a 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -872,7 +872,9 @@ int sqlite3OsSync(OsFile *id, int dataOnly){ } if( id->dirfd>=0 ){ TRACE2("DIRSYNC %-3d\n", id->dirfd); - full_fsync(id->dirfd, id->fullSync, 0); + if( full_fsync(id->dirfd, id->fullSync, 0) ){ + return SQLITE_IOERR; + } close(id->dirfd); /* Only need to sync once, so close the directory */ id->dirfd = -1; /* when we are done. */ }