/ Check-in [a6695b00]
Login

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

Overview
Comment:Return immediately if sqlite3PagerWrite() is called when the pager is in PAGER_ERROR state.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | cacheflush
Files: files | file ages | folders
SHA1:a6695b008487aeb7badf572fa32bfcba3c9fab03
User & Date: dan 2015-10-30 14:28:16
Context
2015-10-30
16:14
Add new API function sqlite3_db_cacheflush(). check-in: ad80d307 user: dan tags: trunk
14:28
Return immediately if sqlite3PagerWrite() is called when the pager is in PAGER_ERROR state. Closed-Leaf check-in: a6695b00 user: dan tags: cacheflush
09:13
Test that calling sqlite3_db_cacheflush() does not interfere with savepoints. check-in: 0e09e4a2 user: dan tags: cacheflush
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pager.c.

5911
5912
5913
5914
5915
5916
5917
5918
5919


5920
5921
5922
5923
5924
5925
5926
5927
** If an error occurs, SQLITE_NOMEM or an IO error code is returned
** as appropriate. Otherwise, SQLITE_OK.
*/
int sqlite3PagerWrite(PgHdr *pPg){
  Pager *pPager = pPg->pPager;
  assert( (pPg->flags & PGHDR_MMAP)==0 );
  assert( pPager->eState>=PAGER_WRITER_LOCKED );
  assert( pPager->eState!=PAGER_ERROR );
  assert( assert_pager_state(pPager) );


  if( (pPg->flags & PGHDR_WRITEABLE)!=0 && pPager->dbSize>=pPg->pgno ){
    if( pPager->nSavepoint ) return subjournalPageIfRequired(pPg);
    return SQLITE_OK;
  }else if( pPager->sectorSize > (u32)pPager->pageSize ){
    return pagerWriteLargeSector(pPg);
  }else{
    return pager_write(pPg);
  }







<

>
>
|







5911
5912
5913
5914
5915
5916
5917

5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
** If an error occurs, SQLITE_NOMEM or an IO error code is returned
** as appropriate. Otherwise, SQLITE_OK.
*/
int sqlite3PagerWrite(PgHdr *pPg){
  Pager *pPager = pPg->pPager;
  assert( (pPg->flags & PGHDR_MMAP)==0 );
  assert( pPager->eState>=PAGER_WRITER_LOCKED );

  assert( assert_pager_state(pPager) );
  if( pPager->errCode ){
    return pPager->errCode;
  }else if( (pPg->flags & PGHDR_WRITEABLE)!=0 && pPager->dbSize>=pPg->pgno ){
    if( pPager->nSavepoint ) return subjournalPageIfRequired(pPg);
    return SQLITE_OK;
  }else if( pPager->sectorSize > (u32)pPager->pageSize ){
    return pagerWriteLargeSector(pPg);
  }else{
    return pager_write(pPg);
  }