mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Minor performance optimization and size reduction to the accessPayload()
routine in btree.c. FossilOrigin-Name: 264e5c10d7144910b3223b64546567fa20e4bc65
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
||||
C Fix\sa\stypo\sin\sthe\shelp\smessage\sfor\skvtest.
|
||||
D 2017-01-20T16:47:34.130
|
||||
C Minor\sperformance\soptimization\sand\ssize\sreduction\sto\sthe\saccessPayload()\nroutine\sin\sbtree.c.
|
||||
D 2017-01-20T20:43:14.971
|
||||
F Makefile.in 41bd4cad981487345c4a84081074bcdb876e4b2e
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc b8ca53350ae545e3562403d5da2a69cec79308da
|
||||
@@ -333,7 +333,7 @@ F src/auth.c 930b376a9c56998557367e6f7f8aaeac82a2a792
|
||||
F src/backup.c faf17e60b43233c214aae6a8179d24503a61e83b
|
||||
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
|
||||
F src/btmutex.c 0e9ce2d56159b89b9bc8e197e023ee11e39ff8ca
|
||||
F src/btree.c 69966fb2c574954cd3216f09407c9a02c52d3bd7
|
||||
F src/btree.c e6b8f39d7dd1ad65f1747956de36f2595172a23d
|
||||
F src/btree.h e6d352808956ec163a17f832193a3e198b3fb0ac
|
||||
F src/btreeInt.h 10c4b77c2fb399580babbcc7cf652ac10dba796e
|
||||
F src/build.c 9e799f1edd910dfa8a0bc29bd390d35d310596af
|
||||
@@ -1547,7 +1547,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 90291327fc127671d9847a4a2ce1ed47a408cfc6
|
||||
R a902108b38beec2205eaeba771709e26
|
||||
U dan
|
||||
Z 09bc78c7c0c7ebb44e280cf03b306ae8
|
||||
P 8971d98f25a4f5fb060db8ed6a4b06f083122a50
|
||||
R 6803846831f043d39b9c85f99ff10309
|
||||
U drh
|
||||
Z 62cd4db9c45f8ac36491823fd1143808
|
||||
|
@@ -1 +1 @@
|
||||
8971d98f25a4f5fb060db8ed6a4b06f083122a50
|
||||
264e5c10d7144910b3223b64546567fa20e4bc65
|
11
src/btree.c
11
src/btree.c
@@ -4523,17 +4523,15 @@ static int accessPayload(
|
||||
pCur->aOverflow, nOvfl*2*sizeof(Pgno)
|
||||
);
|
||||
if( aNew==0 ){
|
||||
rc = SQLITE_NOMEM_BKPT;
|
||||
return SQLITE_NOMEM_BKPT;
|
||||
}else{
|
||||
pCur->nOvflAlloc = nOvfl*2;
|
||||
pCur->aOverflow = aNew;
|
||||
}
|
||||
}
|
||||
if( rc==SQLITE_OK ){
|
||||
memset(pCur->aOverflow, 0, nOvfl*sizeof(Pgno));
|
||||
pCur->curFlags |= BTCF_ValidOvfl;
|
||||
}
|
||||
}
|
||||
|
||||
/* If the overflow page-list cache has been allocated and the
|
||||
** entry for the first required overflow page is valid, skip
|
||||
@@ -4547,8 +4545,8 @@ static int accessPayload(
|
||||
offset = (offset%ovflSize);
|
||||
}
|
||||
|
||||
for( ; rc==SQLITE_OK && amt>0 && nextPage; iIdx++){
|
||||
|
||||
assert( rc==SQLITE_OK && amt>0 );
|
||||
while( nextPage ){
|
||||
/* If required, populate the overflow page-list cache. */
|
||||
if( (pCur->curFlags & BTCF_ValidOvfl)!=0 ){
|
||||
assert( pCur->aOverflow[iIdx]==0
|
||||
@@ -4637,6 +4635,9 @@ static int accessPayload(
|
||||
amt -= a;
|
||||
pBuf += a;
|
||||
}
|
||||
if( amt==0 ) break;
|
||||
if( rc ) break;
|
||||
iIdx++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user