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

Make sure the Salt-1 value in the WAL file is sequentially numbered at

each checkpoint, as it says it should be in the documentation.

FossilOrigin-Name: 7b63b11b93396079131686abb36c4221354fa50e
This commit is contained in:
drh
2011-12-17 01:31:44 +00:00
parent e98842f02d
commit d2980310d0
3 changed files with 9 additions and 9 deletions

View File

@@ -2666,7 +2666,7 @@ int sqlite3WalFrames(
sqlite3Put4byte(&aWalHdr[4], WAL_MAX_VERSION);
sqlite3Put4byte(&aWalHdr[8], szPage);
sqlite3Put4byte(&aWalHdr[12], pWal->nCkpt);
sqlite3_randomness(8, pWal->hdr.aSalt);
if( pWal->nCkpt==0 ) sqlite3_randomness(8, pWal->hdr.aSalt);
memcpy(&aWalHdr[16], pWal->hdr.aSalt, 8);
walChecksumBytes(1, aWalHdr, WAL_HDRSIZE-2*4, 0, aCksum);
sqlite3Put4byte(&aWalHdr[24], aCksum[0]);