1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Small performance and size optimization in sqlite3WalFindFrame().

FossilOrigin-Name: 03f2e78899fad99b0a0951b3a408268276954d4cd785389ed9a0192c9217f6fe
This commit is contained in:
drh
2019-04-17 21:12:05 +00:00
parent e551b51472
commit 680f0fe32a
3 changed files with 10 additions and 10 deletions

View File

@@ -2908,9 +2908,9 @@ int sqlite3WalFindFrame(
}
nCollide = HASHTABLE_NSLOT;
for(iKey=walHash(pgno); sLoc.aHash[iKey]; iKey=walNextHash(iKey)){
u32 iFrame = sLoc.aHash[iKey] + sLoc.iZero;
if( iFrame<=iLast && iFrame>=pWal->minFrame
&& sLoc.aPgno[sLoc.aHash[iKey]]==pgno ){
u32 iH = sLoc.aHash[iKey];
u32 iFrame = iH + sLoc.iZero;
if( iFrame<=iLast && iFrame>=pWal->minFrame && sLoc.aPgno[iH]==pgno ){
assert( iFrame>iRead || CORRUPT_DB );
iRead = iFrame;
}