/ Check-in [373b0ace]
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:Fix a problem building with SQLITE_OMIT_WAL defined.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 373b0ace480aa303bbf512ea8806a17f6186b16d6316a7b724499bf94b3974d4
User & Date: dan 2017-10-05 20:02:49
Context
2017-10-05
20:57
Fix compiler warnings that come up with SQLITE_OMIT_WAL. check-in: 8ca0fa8d user: drh tags: trunk
20:02
Fix a problem building with SQLITE_OMIT_WAL defined. check-in: 373b0ace user: dan tags: trunk
19:12
Fix the command-line shell so that the ".schema --indent" command does a better job of dealing with \r\n in the middle of a CREATE statement in the schema. check-in: 4258fb57 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

  3008   3008   **
  3009   3009   ** If an IO error occurs, then the IO error is returned to the caller.
  3010   3010   ** Otherwise, SQLITE_OK is returned.
  3011   3011   */
  3012   3012   static int readDbPage(PgHdr *pPg){
  3013   3013     Pager *pPager = pPg->pPager; /* Pager object associated with page pPg */
  3014   3014     int rc = SQLITE_OK;          /* Return code */
         3015  +
         3016  +#ifndef SQLITE_OMIT_WAL
  3015   3017     u32 iFrame = 0;              /* Frame of WAL containing pgno */
  3016   3018   
  3017   3019     assert( pPager->eState>=PAGER_READER && !MEMDB );
  3018   3020     assert( isOpen(pPager->fd) );
  3019   3021   
  3020   3022     if( pagerUseWal(pPager) ){
  3021   3023       rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);
  3022   3024       if( rc ) return rc;
  3023   3025     }
  3024   3026     if( iFrame ){
  3025   3027       rc = sqlite3WalReadFrame(pPager->pWal, iFrame,pPager->pageSize,pPg->pData);
  3026         -  }else{
         3028  +  }else
         3029  +#endif
         3030  +  {
  3027   3031       i64 iOffset = (pPg->pgno-1)*(i64)pPager->pageSize;
  3028   3032       rc = sqlite3OsRead(pPager->fd, pPg->pData, pPager->pageSize, iOffset);
  3029   3033       if( rc==SQLITE_IOERR_SHORT_READ ){
  3030   3034         rc = SQLITE_OK;
  3031   3035       }
  3032   3036     }
  3033   3037