/ Check-in [f921df59]
Login

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

Overview
Comment:Fix a cut-and-paste bug causing the library to fail to report database corruption in a few cases.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | incr-vacuum-opt
Files: files | file ages | folders
SHA1: f921df59560d536f5b80eef8c995cbe3ff591bae
User & Date: dan 2013-02-23 19:11:47
Context
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
18:58
Enhancements to test scripts. No code changes. check-in: ccab94c1 user: dan tags: incr-vacuum-opt
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/btree.c.

3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
  nFin = nOrig - nFree - nPtrmap;
  if( nOrig>PENDING_BYTE_PAGE(pBt) && nFin<PENDING_BYTE_PAGE(pBt) ){
    nFin--;
  }
  while( PTRMAP_ISPAGE(pBt, nFin) || nFin==PENDING_BYTE_PAGE(pBt) ){
    nFin--;
  }
  if( nFin>nOrig ) return SQLITE_CORRUPT_BKPT;

  return nFin;
}

/*
** A write-transaction must be opened before calling this function.
** It performs a single unit of work towards an incremental vacuum.







<







3037
3038
3039
3040
3041
3042
3043

3044
3045
3046
3047
3048
3049
3050
  nFin = nOrig - nFree - nPtrmap;
  if( nOrig>PENDING_BYTE_PAGE(pBt) && nFin<PENDING_BYTE_PAGE(pBt) ){
    nFin--;
  }
  while( PTRMAP_ISPAGE(pBt, nFin) || nFin==PENDING_BYTE_PAGE(pBt) ){
    nFin--;
  }


  return nFin;
}

/*
** A write-transaction must be opened before calling this function.
** It performs a single unit of work towards an incremental vacuum.