/ Check-in [d4dff10a]
Login

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

Overview
Comment:Performance optimization in sqlite3PagerWrite().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d4dff10a3d4edf8e1cc77c0a4f185d33f2c2e953
User & Date: drh 2016-12-12 11:05:15
Context
2016-12-12
16:08
Faster operation for large in-memory databases. check-in: 9675518b user: drh tags: trunk
12:58
Merge recent enhancements from trunk. check-in: dc006e08 user: drh tags: est_count_pragma
11:05
Performance optimization in sqlite3PagerWrite(). check-in: d4dff10a user: drh tags: trunk
01:53
Updates to the tokenizer for EBCDIC. No changes for standard builds. check-in: 4fc6580f user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

  5957   5957   ** as appropriate. Otherwise, SQLITE_OK.
  5958   5958   */
  5959   5959   int sqlite3PagerWrite(PgHdr *pPg){
  5960   5960     Pager *pPager = pPg->pPager;
  5961   5961     assert( (pPg->flags & PGHDR_MMAP)==0 );
  5962   5962     assert( pPager->eState>=PAGER_WRITER_LOCKED );
  5963   5963     assert( assert_pager_state(pPager) );
  5964         -  if( pPager->errCode ){
  5965         -    return pPager->errCode;
  5966         -  }else if( (pPg->flags & PGHDR_WRITEABLE)!=0 && pPager->dbSize>=pPg->pgno ){
         5964  +  if( (pPg->flags & PGHDR_WRITEABLE)!=0 && pPager->dbSize>=pPg->pgno ){
  5967   5965       if( pPager->nSavepoint ) return subjournalPageIfRequired(pPg);
  5968   5966       return SQLITE_OK;
         5967  +  }else if( pPager->errCode ){
         5968  +    return pPager->errCode;
  5969   5969     }else if( pPager->sectorSize > (u32)pPager->pageSize ){
  5970   5970       assert( pPager->tempFile==0 );
  5971   5971       return pagerWriteLargeSector(pPg);
  5972   5972     }else{
  5973   5973       return pager_write(pPg);
  5974   5974     }
  5975   5975   }