/ Check-in [4cd30c72]
Login

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

Overview
Comment:Fix a case in the incremental vacuum code where database corruption was going unreported.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | incr-vacuum-opt
Files: files | file ages | folders
SHA1: 4cd30c72629a7f44b18026a70103aa0bb8a3b959
User & Date: dan 2013-02-23 19:43:47
Context
2013-02-24
11:50
Fix a case where database corruption may cause an assert() to fail. check-in: ba33bb05 user: dan tags: incr-vacuum-opt
2013-02-23
19:43
Fix a case in the incremental vacuum code where database corruption was going unreported. check-in: 4cd30c72 user: dan tags: incr-vacuum-opt
19:11
Fix a cut-and-paste bug causing the library to fail to report database corruption in a few cases. check-in: f921df59 user: dan tags: incr-vacuum-opt
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  3062   3062     if( !pBt->autoVacuum ){
  3063   3063       rc = SQLITE_DONE;
  3064   3064     }else{
  3065   3065       Pgno nOrig = btreePagecount(pBt);
  3066   3066       Pgno nFree = get4byte(&pBt->pPage1->aData[36]);
  3067   3067       Pgno nFin = finalDbSize(pBt, nOrig, nFree);
  3068   3068   
  3069         -    if( nFin<nOrig ){
         3069  +    if( nFree>0 ){
  3070   3070         invalidateAllOverflowCache(pBt);
  3071   3071         rc = incrVacuumStep(pBt, nFin, nOrig, 0);
  3072   3072         if( rc==SQLITE_OK ){
  3073   3073           rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
  3074   3074           put4byte(&pBt->pPage1->aData[28], pBt->nPage);
  3075   3075         }
  3076   3076       }else{