/ Check-in [7b63b11b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7b63b11b93396079131686abb36c4221354fa50e
User & Date: drh 2011-12-17 01:31:44
Context
2011-12-17
08:10
Add tests to walcrash3.test. check-in: d7688042 user: dan tags: trunk
01:31
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. check-in: 7b63b11b user: drh tags: trunk
2011-12-16
17:01
Add code for a test that was failing before the persistent-wal related changes of [09ccc4a1be]. check-in: 49d21ce5 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/wal.c.

  2662   2662       u8 aWalHdr[WAL_HDRSIZE];      /* Buffer to assemble wal-header in */
  2663   2663       u32 aCksum[2];                /* Checksum for wal-header */
  2664   2664   
  2665   2665       sqlite3Put4byte(&aWalHdr[0], (WAL_MAGIC | SQLITE_BIGENDIAN));
  2666   2666       sqlite3Put4byte(&aWalHdr[4], WAL_MAX_VERSION);
  2667   2667       sqlite3Put4byte(&aWalHdr[8], szPage);
  2668   2668       sqlite3Put4byte(&aWalHdr[12], pWal->nCkpt);
  2669         -    sqlite3_randomness(8, pWal->hdr.aSalt);
         2669  +    if( pWal->nCkpt==0 ) sqlite3_randomness(8, pWal->hdr.aSalt);
  2670   2670       memcpy(&aWalHdr[16], pWal->hdr.aSalt, 8);
  2671   2671       walChecksumBytes(1, aWalHdr, WAL_HDRSIZE-2*4, 0, aCksum);
  2672   2672       sqlite3Put4byte(&aWalHdr[24], aCksum[0]);
  2673   2673       sqlite3Put4byte(&aWalHdr[28], aCksum[1]);
  2674   2674       
  2675   2675       pWal->szPage = szPage;
  2676   2676       pWal->hdr.bigEndCksum = SQLITE_BIGENDIAN;