/ Check-in [d7ed4634]
Login

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

Overview
Comment:It is no longer possible to reach pagerStress() while in the error state, so put a NEVER() around the error state test of that routine.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d7ed463496c4474cc435d032874a4e55d780e74a
User & Date: drh 2010-08-17 18:37:13
Context
2010-08-17
19:34
Return an error when parsing "?NNN" if NNN is so large it cannot be stored as a 32-bit int. check-in: fc9014be user: dan tags: trunk
18:37
It is no longer possible to reach pagerStress() while in the error state, so put a NEVER() around the error state test of that routine. check-in: d7ed4634 user: drh tags: trunk
18:15
If an SQLITE_FULL error occurs during rollback or journal finalization, treat it in the same way as SQLITE_IOERR (i.e. require that the pager internals be completely reset before it is next read from or written to). check-in: 8ac18523 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pager.c.

4049
4050
4051
4052
4053
4054
4055
4056





4057
4058

4059
4060
4061
4062
4063
4064
4065
  ** journal (and adding a new header) is not allowed.  This occurs
  ** during calls to sqlite3PagerWrite() while trying to journal multiple
  ** pages belonging to the same sector.
  **
  ** The doNotSpill flag inhibits all cache spilling regardless of whether
  ** or not a sync is required.  This is set during a rollback.
  **
  ** Spilling is also inhibited when in an error state.





  */
  if( pPager->errCode ) return SQLITE_OK;

  if( pPager->doNotSpill ) return SQLITE_OK;
  if( pPager->doNotSyncSpill && (pPg->flags & PGHDR_NEED_SYNC)!=0 ){
    return SQLITE_OK;
  }

  pPg->pDirty = 0;
  if( pagerUseWal(pPager) ){







|
>
>
>
>
>

<
>







4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062

4063
4064
4065
4066
4067
4068
4069
4070
  ** journal (and adding a new header) is not allowed.  This occurs
  ** during calls to sqlite3PagerWrite() while trying to journal multiple
  ** pages belonging to the same sector.
  **
  ** The doNotSpill flag inhibits all cache spilling regardless of whether
  ** or not a sync is required.  This is set during a rollback.
  **
  ** Spilling is also prohibited when in an error state since that could
  ** lead to database corruption.   In the current implementaton it 
  ** is impossible for sqlite3PCacheFetch() to be called with createFlag==1
  ** while in the error state, hence it is impossible for this routine to
  ** be called in the error state.  Nevertheless, we include a NEVER()
  ** test for the error state as a safeguard against future changes.
  */

  if( NEVER(pPager->errCode) ) return SQLITE_OK;
  if( pPager->doNotSpill ) return SQLITE_OK;
  if( pPager->doNotSyncSpill && (pPg->flags & PGHDR_NEED_SYNC)!=0 ){
    return SQLITE_OK;
  }

  pPg->pDirty = 0;
  if( pagerUseWal(pPager) ){