/ Check-in [f25a56c2]
Login

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

Overview
Comment:Early detection of freelist size corruption in incremental vacuum.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f25a56c26e28abd44373230c6b5763aed35c9a7648abede8a53409dccc0bee1d
User & Date: drh 2020-07-14 12:40:53
Context
2020-07-14
15:30
Fix an obsolete header comment on the sqlite3WhereIsOrdered() routine. (check-in: 5041f6a1 user: drh tags: trunk)
13:02
Merge fixes from trunk. (check-in: 2af372f5 user: drh tags: minmax-opt-exp)
12:40
Early detection of freelist size corruption in incremental vacuum. (check-in: f25a56c2 user: drh tags: trunk)
2020-07-13
15:35
Add back the ALWAYS() macro that was removed by [f7a74f89dbd58b47] as the condition is no longer reachable due to the previous check-in. (check-in: 9cb03bea user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/btree.c.

3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
  if( !pBt->autoVacuum ){
    rc = SQLITE_DONE;
  }else{
    Pgno nOrig = btreePagecount(pBt);
    Pgno nFree = get4byte(&pBt->pPage1->aData[36]);
    Pgno nFin = finalDbSize(pBt, nOrig, nFree);

    if( nOrig<nFin ){
      rc = SQLITE_CORRUPT_BKPT;
    }else if( nFree>0 ){
      rc = saveAllCursors(pBt, 0, 0);
      if( rc==SQLITE_OK ){
        invalidateAllOverflowCache(pBt);
        rc = incrVacuumStep(pBt, nFin, nOrig, 0);
      }







|







3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
  if( !pBt->autoVacuum ){
    rc = SQLITE_DONE;
  }else{
    Pgno nOrig = btreePagecount(pBt);
    Pgno nFree = get4byte(&pBt->pPage1->aData[36]);
    Pgno nFin = finalDbSize(pBt, nOrig, nFree);

    if( nOrig<nFin || nFree>=nOrig ){
      rc = SQLITE_CORRUPT_BKPT;
    }else if( nFree>0 ){
      rc = saveAllCursors(pBt, 0, 0);
      if( rc==SQLITE_OK ){
        invalidateAllOverflowCache(pBt);
        rc = incrVacuumStep(pBt, nFin, nOrig, 0);
      }

Changes to test/fuzzdata8.db.

cannot compute difference between binary files