SQLite

Check-in [afb2484c64]
Login

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

Overview
Comment:Simplification of changes for SQLITE_OMIT_WAL support in pager.c.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: afb2484c64bf0cdec8240b9ecd0a794c44a63066
User & Date: shaneh 2010-08-26 05:23:37.000
Context
2010-08-26
07:59
Improve coverage of rtree.c some more. (check-in: bee1959dde user: dan tags: trunk)
05:23
Simplification of changes for SQLITE_OMIT_WAL support in pager.c. (check-in: afb2484c64 user: shaneh tags: trunk)
2010-08-25
20:35
Reinstate the "sqlite" alias for backwards compatibility (but leave it undocumented) but remove the PackageProvide for "sqlite". (check-in: 699cc6b487 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/pager.c.
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
  ** function returns zero if the WAL is not open (i.e. Pager.pWal==0), or
  ** if the database size is not available. The database size is not
  ** available from the WAL sub-system if the log file is empty or
  ** contains no valid committed transactions.
  */
  assert( pPager->eState==PAGER_OPEN );
  assert( pPager->eLock>=SHARED_LOCK || pPager->noReadlock );
#ifndef SQLITE_OMIT_WAL
  nPage = sqlite3WalDbsize(pPager->pWal);
#else
  nPage = 0;
#endif

  /* If the database size was not available from the WAL sub-system,
  ** determine it based on the size of the database file. If the size
  ** of the database file is not an integer multiple of the page-size,
  ** round down to the nearest page. Except, any file larger than 0
  ** bytes in size is considered to contain at least one page.
  */







<

<
<
<







2995
2996
2997
2998
2999
3000
3001

3002



3003
3004
3005
3006
3007
3008
3009
  ** function returns zero if the WAL is not open (i.e. Pager.pWal==0), or
  ** if the database size is not available. The database size is not
  ** available from the WAL sub-system if the log file is empty or
  ** contains no valid committed transactions.
  */
  assert( pPager->eState==PAGER_OPEN );
  assert( pPager->eLock>=SHARED_LOCK || pPager->noReadlock );

  nPage = sqlite3WalDbsize(pPager->pWal);




  /* If the database size was not available from the WAL sub-system,
  ** determine it based on the size of the database file. If the size
  ** of the database file is not an integer multiple of the page-size,
  ** round down to the nearest page. Except, any file larger than 0
  ** bytes in size is considered to contain at least one page.
  */