Very minor optimizations in the unix VFS.
FossilOrigin-Name: 6db3ff45bc15ece29cb2c7a736e5c6d005dde200
This commit is contained in:
parent
59a5364cf9
commit
02bf8b45b7
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
|||||||
C Performance\simprovement\sin\ssqlite3VarintLen().
|
C Very\sminor\soptimizations\sin\sthe\sunix\sVFS.
|
||||||
D 2015-09-01T22:29:07.506
|
D 2015-09-01T23:51:53.351
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in f85066ce844a28b671aaeeff320921cd0ce36239
|
F Makefile.in f85066ce844a28b671aaeeff320921cd0ce36239
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@ -321,7 +321,7 @@ F src/os.c 8fd25588eeba74068d41102d26810e216999b6c8
|
|||||||
F src/os.h 3e57a24e2794a94d3cf2342c6d9a884888cd96bf
|
F src/os.h 3e57a24e2794a94d3cf2342c6d9a884888cd96bf
|
||||||
F src/os_common.h abdb9a191a367793268fe553d25bab894e986a0e
|
F src/os_common.h abdb9a191a367793268fe553d25bab894e986a0e
|
||||||
F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa
|
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.c 40b3af7a47eb1107d0d69e592bec345a3b7b798a
|
||||||
F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
|
F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
|
||||||
F src/pager.c aa916ca28606ccf4b6877dfc2b643ccbca86589f
|
F src/pager.c aa916ca28606ccf4b6877dfc2b643ccbca86589f
|
||||||
@ -1380,7 +1380,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
|||||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||||
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
||||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||||
P 8a80967f849eed002a701235ed7fb406099d566e
|
P adf9fefb00ae1dbb07a921c6796cb0a9505c6d19
|
||||||
R f6fa5fc612cf465d55de62b1cff01312
|
R 15ed1e546d27e5e6e36f3f7a000cba56
|
||||||
U drh
|
U drh
|
||||||
Z 09ba603411590b2095375d5c2fdf1bdd
|
Z d46ac269d8c66ccb24de8ee93f61442e
|
||||||
|
@ -1 +1 @@
|
|||||||
adf9fefb00ae1dbb07a921c6796cb0a9505c6d19
|
6db3ff45bc15ece29cb2c7a736e5c6d005dde200
|
@ -3146,7 +3146,6 @@ static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
|
|||||||
TIMER_START;
|
TIMER_START;
|
||||||
assert( cnt==(cnt&0x1ffff) );
|
assert( cnt==(cnt&0x1ffff) );
|
||||||
assert( id->h>2 );
|
assert( id->h>2 );
|
||||||
cnt &= 0x1ffff;
|
|
||||||
do{
|
do{
|
||||||
#if defined(USE_PREAD)
|
#if defined(USE_PREAD)
|
||||||
got = osPread(id->h, pBuf, cnt, offset);
|
got = osPread(id->h, pBuf, cnt, offset);
|
||||||
@ -3363,8 +3362,8 @@ static int unixWrite(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while( amt>0 && (wrote = seekAndWrite(pFile, offset, pBuf, amt))>0 ){
|
while( (wrote = seekAndWrite(pFile, offset, pBuf, amt))<amt && wrote>0 ){
|
||||||
amt -= wrote;
|
amt -= wrote;
|
||||||
offset += wrote;
|
offset += wrote;
|
||||||
pBuf = &((char*)pBuf)[wrote];
|
pBuf = &((char*)pBuf)[wrote];
|
||||||
@ -3372,7 +3371,7 @@ static int unixWrite(
|
|||||||
SimulateIOError(( wrote=(-1), amt=1 ));
|
SimulateIOError(( wrote=(-1), amt=1 ));
|
||||||
SimulateDiskfullError(( wrote=0, amt=1 ));
|
SimulateDiskfullError(( wrote=0, amt=1 ));
|
||||||
|
|
||||||
if( amt>0 ){
|
if( amt>wrote ){
|
||||||
if( wrote<0 && pFile->lastErrno!=ENOSPC ){
|
if( wrote<0 && pFile->lastErrno!=ENOSPC ){
|
||||||
/* lastErrno set by seekAndWrite */
|
/* lastErrno set by seekAndWrite */
|
||||||
return SQLITE_IOERR_WRITE;
|
return SQLITE_IOERR_WRITE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user