SQLite

Check-in [fd085e9260]
Login

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

Overview
Comment:Fix the SQLITE_DIRECT_OVERFLOW_READ compile-time option so that it works with SQLITE_HAS_CODEC.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fd085e9260bec18f968704abb2dd324d954baa121d13b67c3f5b801e9e3834aa
User & Date: drh 2019-03-02 15:25:24.014
Context
2019-03-02
20:09
Improved comments on the fossildelta.c extension. (check-in: d7d23f0450 user: drh tags: trunk)
15:25
Fix the SQLITE_DIRECT_OVERFLOW_READ compile-time option so that it works with SQLITE_HAS_CODEC. (check-in: fd085e9260 user: drh tags: trunk)
12:17
Remove a redundant parameter extraction call from the percentile.c extension. (check-in: d49c32e6e7 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/pager.c.
833
834
835
836
837
838
839



840
841
842
843
844
845
846
**   * the database file is open,
**   * there are no dirty pages in the cache, and
**   * the desired page is not currently in the wal file.
*/
int sqlite3PagerDirectReadOk(Pager *pPager, Pgno pgno){
  if( pPager->fd->pMethods==0 ) return 0;
  if( sqlite3PCacheIsDirty(pPager->pPCache) ) return 0;



#ifndef SQLITE_OMIT_WAL
  if( pPager->pWal ){
    u32 iRead = 0;
    int rc;
    rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iRead);
    return (rc==SQLITE_OK && iRead==0);
  }







>
>
>







833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
**   * the database file is open,
**   * there are no dirty pages in the cache, and
**   * the desired page is not currently in the wal file.
*/
int sqlite3PagerDirectReadOk(Pager *pPager, Pgno pgno){
  if( pPager->fd->pMethods==0 ) return 0;
  if( sqlite3PCacheIsDirty(pPager->pPCache) ) return 0;
#ifdef SQLITE_HAS_CODEC
  if( pPager->xCodec!=0 ) return 0;
#endif
#ifndef SQLITE_OMIT_WAL
  if( pPager->pWal ){
    u32 iRead = 0;
    int rc;
    rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iRead);
    return (rc==SQLITE_OK && iRead==0);
  }