/ Check-in [8f005337]
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:Remove a NEVER in sqlite3PagerPagecount() that can in fact be true.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8f00533782a0eae5613caaf86608384cb702fc51
User & Date: drh 2010-04-01 02:47:01
Context
2010-04-01
13:41
Do not journal the content of freelist leaf pages. This restores an optimization that was accidently undone by check-in [12f7346c13] on 2009-01-20. check-in: b1e7a1a6 user: drh tags: trunk
02:47
Remove a NEVER in sqlite3PagerPagecount() that can in fact be true. check-in: 8f005337 user: drh tags: trunk
02:22
Restore the size information in the BtShared structure when a transaction rolls back. check-in: 802aeb30 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pager.c.

2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
** Otherwise, if everything is successful, then SQLITE_OK is returned
** and *pnPage is set to the number of pages in the database.
*/
int sqlite3PagerPagecount(Pager *pPager, int *pnPage){
  Pgno nPage;               /* Value to return via *pnPage */

  /* If the pager is already in the error state, return the error code. */
  if( NEVER(pPager->errCode) ){
    return pPager->errCode;
  }

  /* Determine the number of pages in the file. Store this in nPage. */
  if( pPager->dbSizeValid ){
    nPage = pPager->dbSize;
  }else{







|







2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
** Otherwise, if everything is successful, then SQLITE_OK is returned
** and *pnPage is set to the number of pages in the database.
*/
int sqlite3PagerPagecount(Pager *pPager, int *pnPage){
  Pgno nPage;               /* Value to return via *pnPage */

  /* If the pager is already in the error state, return the error code. */
  if( pPager->errCode ){
    return pPager->errCode;
  }

  /* Determine the number of pages in the file. Store this in nPage. */
  if( pPager->dbSizeValid ){
    nPage = pPager->dbSize;
  }else{