]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Very minor optimizations in the unix VFS.
authordrh <drh@noemail.net>
Tue, 1 Sep 2015 23:51:53 +0000 (23:51 +0000)
committerdrh <drh@noemail.net>
Tue, 1 Sep 2015 23:51:53 +0000 (23:51 +0000)
FossilOrigin-Name: 6db3ff45bc15ece29cb2c7a736e5c6d005dde200

manifest
manifest.uuid
src/os_unix.c

index 19e81b185fe75b2d63638995981ff259dcc01ab3..456085fe456ac643994a5d75cec31d1389e1547b 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Performance\simprovement\sin\ssqlite3VarintLen().
-D 2015-09-01T22:29:07.506
+C Very\sminor\soptimizations\sin\sthe\sunix\sVFS.
+D 2015-09-01T23:51:53.351
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in f85066ce844a28b671aaeeff320921cd0ce36239
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -321,7 +321,7 @@ F src/os.c 8fd25588eeba74068d41102d26810e216999b6c8
 F src/os.h 3e57a24e2794a94d3cf2342c6d9a884888cd96bf
 F src/os_common.h abdb9a191a367793268fe553d25bab894e986a0e
 F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa
-F src/os_unix.c 388c023582b17890f10c980b30ec1922b471753b
+F src/os_unix.c 76f493ed71c4154338049dee1bf6e47f69c74a55
 F src/os_win.c 40b3af7a47eb1107d0d69e592bec345a3b7b798a
 F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
 F src/pager.c aa916ca28606ccf4b6877dfc2b643ccbca86589f
@@ -1380,7 +1380,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 8a80967f849eed002a701235ed7fb406099d566e
-R f6fa5fc612cf465d55de62b1cff01312
+P adf9fefb00ae1dbb07a921c6796cb0a9505c6d19
+R 15ed1e546d27e5e6e36f3f7a000cba56
 U drh
-Z 09ba603411590b2095375d5c2fdf1bdd
+Z d46ac269d8c66ccb24de8ee93f61442e
index df0b92fb656805ecb3eee8eaeb3e5351981edae4..45286f37bb15255e0371d0928ac6ab3f826cecbf 100644 (file)
@@ -1 +1 @@
-adf9fefb00ae1dbb07a921c6796cb0a9505c6d19
\ No newline at end of file
+6db3ff45bc15ece29cb2c7a736e5c6d005dde200
\ No newline at end of file
index d7a94ab096c75c26d9115a7c84e4222cd6ca8bfa..53a4fd31bd84960ab3da2ac455665ac992eb12cb 100644 (file)
@@ -3146,7 +3146,6 @@ static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
   TIMER_START;
   assert( cnt==(cnt&0x1ffff) );
   assert( id->h>2 );
-  cnt &= 0x1ffff;
   do{
 #if defined(USE_PREAD)
     got = osPread(id->h, pBuf, cnt, offset);
@@ -3363,8 +3362,8 @@ static int unixWrite(
     }
   }
 #endif
-
-  while( amt>0 && (wrote = seekAndWrite(pFile, offset, pBuf, amt))>0 ){
+  while( (wrote = seekAndWrite(pFile, offset, pBuf, amt))<amt && wrote>0 ){
     amt -= wrote;
     offset += wrote;
     pBuf = &((char*)pBuf)[wrote];
@@ -3372,7 +3371,7 @@ static int unixWrite(
   SimulateIOError(( wrote=(-1), amt=1 ));
   SimulateDiskfullError(( wrote=0, amt=1 ));
 
-  if( amt>0 ){
+  if( amt>wrote ){
     if( wrote<0 && pFile->lastErrno!=ENOSPC ){
       /* lastErrno set by seekAndWrite */
       return SQLITE_IOERR_WRITE;