/ Check-in [271b8980]
Login

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

Overview
Comment:Avoid a branch in the commit logic that is unreachable when compiled without SQLITE_ENABLE_BATCH_ATOMIC_WRITE.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:271b8980c3bcd0403a40aec26681ec111be1d88d2d5d35199a85a10f09ad6920
User & Date: drh 2018-07-19 15:27:35
Context
2018-07-20
13:39
Enhanced detection of problems on the freelist and on overflow list in PRAGMA integrity_check. check-in: 11e58f5b user: drh tags: trunk
2018-07-19
15:27
Avoid a branch in the commit logic that is unreachable when compiled without SQLITE_ENABLE_BATCH_ATOMIC_WRITE. check-in: 271b8980 user: drh tags: trunk
14:40
Allow the VACUUM following SQLITE_DBCONFIG_RESET_DATABASE to proceed even if the write-version in the header indicates that the database file is not writable. check-in: 3dca8b9d user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

  6511   6511             }
  6512   6512           }
  6513   6513   
  6514   6514           if( (rc&0xFF)==SQLITE_IOERR && rc!=SQLITE_IOERR_NOMEM ){
  6515   6515             rc = sqlite3JournalCreate(pPager->jfd);
  6516   6516             if( rc!=SQLITE_OK ){
  6517   6517               sqlite3OsClose(pPager->jfd);
         6518  +            goto commit_phase_one_exit;
  6518   6519             }
  6519   6520             bBatch = 0;
  6520   6521           }else{
  6521   6522             sqlite3OsClose(pPager->jfd);
  6522   6523           }
  6523   6524         }
  6524   6525   #endif /* SQLITE_ENABLE_BATCH_ATOMIC_WRITE */
  6525   6526   
  6526         -      if( bBatch==0 && rc==SQLITE_OK ){
         6527  +      if( bBatch==0 ){
  6527   6528           rc = pager_write_pagelist(pPager, pList);
  6528   6529         }
  6529         -
  6530   6530         if( rc!=SQLITE_OK ){
  6531   6531           assert( rc!=SQLITE_IOERR_BLOCKED );
  6532   6532           goto commit_phase_one_exit;
  6533   6533         }
  6534   6534         sqlite3PcacheCleanAll(pPager->pPCache);
  6535   6535   
  6536   6536         /* If the file on disk is smaller than the database image, use