SQLite

Check-in [1b0f4cc362]
Login

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

Overview
Comment:Simplification of the sqlite3FaultSim() call inside of sqlite3PagerCommitPhaseOne().
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1b0f4cc362cda1dc175aa363ae4e612b7d1164c3
User & Date: drh 2016-05-12 19:05:35.053
Context
2016-05-12
19:17
Disable ALWAYS and NEVER when compiled with SQLITE_MUTATION_TEST. (check-in: 24d9fbc1d0 user: drh tags: trunk)
19:05
Simplification of the sqlite3FaultSim() call inside of sqlite3PagerCommitPhaseOne(). (check-in: 1b0f4cc362 user: drh tags: trunk)
18:38
Add an assert in pager.c to confirm that pPager->tempFile is always true for in-memory databases. (check-in: 3fd7109206 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/pager.c.
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
  );
  assert( assert_pager_state(pPager) );

  /* If a prior error occurred, report that error again. */
  if( NEVER(pPager->errCode) ) return pPager->errCode;

  /* Provide the ability to easily simulate an I/O error during testing */
  if( (rc = sqlite3FaultSim(400))!=SQLITE_OK ) return rc;

  PAGERTRACE(("DATABASE SYNC: File=%s zMaster=%s nSize=%d\n", 
      pPager->zFilename, zMaster, pPager->dbSize));

  /* If no database changes have been made, return early. */
  if( pPager->eState<PAGER_WRITER_CACHEMOD ) return SQLITE_OK;








|







6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
  );
  assert( assert_pager_state(pPager) );

  /* If a prior error occurred, report that error again. */
  if( NEVER(pPager->errCode) ) return pPager->errCode;

  /* Provide the ability to easily simulate an I/O error during testing */
  if( sqlite3FaultSim(400) ) return SQLITE_IOERR;

  PAGERTRACE(("DATABASE SYNC: File=%s zMaster=%s nSize=%d\n", 
      pPager->zFilename, zMaster, pPager->dbSize));

  /* If no database changes have been made, return early. */
  if( pPager->eState<PAGER_WRITER_CACHEMOD ) return SQLITE_OK;