1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Merge latest changes from wal2 into this branch.

FossilOrigin-Name: 4efefb5938c1ec83ee367ae5cc4bba906729b4e8699fa81adc6ca3618c73eb03
This commit is contained in:
dan
2021-05-21 17:31:04 +00:00
238 changed files with 6929 additions and 2790 deletions

View File

@@ -1315,7 +1315,6 @@ static void walCleanupHash(Wal *pWal){
int iLimit = 0; /* Zero values greater than this */
int nByte; /* Number of bytes to zero in aPgno[] */
int i; /* Used to iterate through aHash[] */
int rc; /* Return code form walHashGet() */
int iWal = walidxGetFile(&pWal->hdr);
u32 mxFrame = walidxGetMxFrame(&pWal->hdr, iWal);
@@ -1340,8 +1339,8 @@ static void walCleanupHash(Wal *pWal){
*/
assert( pWal->nWiData>walFramePage(iExternal) );
assert( pWal->apWiData[walFramePage(iExternal)] );
rc = walHashGet(pWal, walFramePage(iExternal), &sLoc);
if( NEVER(rc) ) return; /* Defense-in-depth, in case (1) above is wrong */
i = walHashGet(pWal, walFramePage(iExternal), &sLoc);
if( NEVER(i) ) return; /* Defense-in-depth, in case (1) above is wrong */
/* Zero all hash-table entries that correspond to frame numbers greater
** than pWal->hdr.mxFrame.