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

Remove the code that tries to detect OOO header writes on a WAL recovery.

The code is made obsolete by syncing the WAL header.

FossilOrigin-Name: 7ac713a14e24c48651c2a97acc9839850fa7f3c3
This commit is contained in:
drh
2011-12-20 22:18:51 +00:00
parent d992b150c7
commit f694aa6454
3 changed files with 8 additions and 15 deletions

View File

@@ -1163,15 +1163,8 @@ static int walIndexRecover(Wal *pWal){
iFrame++;
rc = sqlite3OsRead(pWal->pWalFd, aFrame, szFrame, iOffset);
if( rc!=SQLITE_OK ) break;
if( sqlite3Get4byte(&aFrame[8]) ==
1+sqlite3Get4byte((u8*)&pWal->hdr.aSalt[0]) ){
pWal->hdr.mxFrame = 0;
pWal->hdr.nPage = 0;
break;
}
if( !isValid ) continue;
isValid = walDecodeFrame(pWal, &pgno, &nTruncate, aData, aFrame);
if( !isValid ) continue;
if( !isValid ) break;
rc = walIndexAppend(pWal, iFrame, pgno);
if( rc!=SQLITE_OK ) break;