From: dan Date: Tue, 6 Jan 2015 21:31:47 +0000 (+0000) Subject: Fix a problem in the unix implementation of FCNTL_SIZE_HINT on systems that do not... X-Git-Tag: version-3.8.8~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef3d66cb0133dcd1b07548d771fd48d4607d32cf;p=thirdparty%2Fsqlite.git Fix a problem in the unix implementation of FCNTL_SIZE_HINT on systems that do not support posix_fallocate(). FossilOrigin-Name: af20eae1e6f608e4e61a07c3d14cf88c12751353 --- diff --git a/manifest b/manifest index 4563309ff7..b0a012638e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Improved\sand\smore\srigorous\stest\sof\slarge\sVALUES\sclauses. -D 2015-01-06T16:53:49.824 +C Fix\sa\sproblem\sin\sthe\sunix\simplementation\sof\sFCNTL_SIZE_HINT\son\ssystems\sthat\sdo\snot\ssupport\sposix_fallocate(). +D 2015-01-06T21:31:47.399 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 335e2d3ff0f2455eacbfa3075fc37495e3321410 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -213,7 +213,7 @@ F src/os.c 8fd25588eeba74068d41102d26810e216999b6c8 F src/os.h 3e57a24e2794a94d3cf2342c6d9a884888cd96bf F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04 F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa -F src/os_unix.c 08c0346d2ea5e5ffd5b1a796f9becf1976d648d7 +F src/os_unix.c 949cdedc74dbf3c17f2c9743064ce307026f871e F src/os_win.c 91d3d08e33ec0258d180d4c8255492f47d15e007 F src/os_win.h 09e751b20bbc107ffbd46e13555dc73576d88e21 F src/pager.c 4120a49ecd37697e28f5ed807f470b9c0b88410c @@ -1235,7 +1235,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P e1c4a359aacfce97eb1652624789e71981e0d263 -R e91ef90a16bba44cf708262fb6cb820b -U drh -Z 19b2f03fd6d61f381622fb62b54f6f32 +P 6917d9f437224229fa103c847c2df87ade64e1e9 +R 0111aab44e1e45e62cc43cdb1ef5ac44 +U dan +Z 3770b6339e7a7811d980a8c39cc67da5 diff --git a/manifest.uuid b/manifest.uuid index 0767c77fe9..4550f6b084 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6917d9f437224229fa103c847c2df87ade64e1e9 \ No newline at end of file +af20eae1e6f608e4e61a07c3d14cf88c12751353 \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index f802d9cd19..3fcb0cff24 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3717,6 +3717,7 @@ static int fcntlSizeHint(unixFile *pFile, i64 nByte){ ** that do not have a real fallocate() call. */ int nBlk = buf.st_blksize; /* File-system block size */ + int nWrite = 0; /* Number of bytes written by seekAndWrite */ i64 iWrite; /* Next offset to write to */ iWrite = ((buf.st_size + 2*nBlk - 1)/nBlk)*nBlk-1; @@ -3724,11 +3725,11 @@ static int fcntlSizeHint(unixFile *pFile, i64 nByte){ assert( (iWrite/nBlk)==((buf.st_size+nBlk-1)/nBlk) ); assert( ((iWrite+1)%nBlk)==0 ); for(/*no-op*/; iWrite