/ Check-in [767ee30e]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix a bad assert related to snapshots.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | snapshot-get
Files: files | file ages | folders
SHA1: 767ee30efa5dd469e3a51d4e44cbe473061819b9
User & Date: drh 2015-12-11 01:22:22
Context
2015-12-11
03:16
Fix a variable type mismatch problem in the snapshot logic. check-in: 93fb8010 user: drh tags: snapshot-get
01:22
Fix a bad assert related to snapshots. check-in: 767ee30e user: drh tags: snapshot-get
2015-12-10
22:48
Snapshot documentation updates. Comment changes only - no changes to code. check-in: ef51a398 user: drh tags: snapshot-get
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/wal.c.

  2415   2415         **
  2416   2416         **    (2)  A checkpoint as been attempted that wrote frames past
  2417   2417         **         pSnapshot->mxFrame into the database file.  Note that the
  2418   2418         **         checkpoint need not have completed for this to cause problems.
  2419   2419         */
  2420   2420         volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
  2421   2421   
  2422         -      assert( pWal->readLock>0 );
         2422  +      assert( pWal->readLock>0 || pWal->hdr.mxFrame==0 );
  2423   2423         assert( pInfo->aReadMark[pWal->readLock]<=pSnapshot->mxFrame );
  2424   2424   
  2425   2425         /* It is possible that there is a checkpointer thread running 
  2426   2426         ** concurrent with this code. If this is the case, it may be that the
  2427   2427         ** checkpointer has already determined that it will checkpoint 
  2428   2428         ** snapshot X, where X is later in the wal file than pSnapshot, but 
  2429   2429         ** has not yet set the pInfo->nBackfillAttempted variable to indicate