diff options
author | drh <drh@noemail.net> | 2011-12-17 01:31:44 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-12-17 01:31:44 +0000 |
commit | d2980310d01601abd215e01a255b8dffcccada29 (patch) | |
tree | 91bcfa562b390fc09a5c9bc4b0644cc265be0999 /src/wal.c | |
parent | e98842f02d1f8fa6ace6296c609bf7c0c87c9fb8 (diff) | |
download | sqlite-d2980310d01601abd215e01a255b8dffcccada29.tar.gz sqlite-d2980310d01601abd215e01a255b8dffcccada29.zip |
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
Diffstat (limited to 'src/wal.c')
-rw-r--r-- | src/wal.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]); |