/ Check-in [9495d338]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix pager_end_transaction() to ensure that a ROLLBACK does not clobber unwritten pages in a TEMP file pcache.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9495d33879221c1821331dc72c61a6a3d182f526
User & Date: drh 2016-05-13 11:50:00
Context
2016-05-13
12:12
Clarification of the pagerFlushOnCommit() logic. check-in: 3401d9dc user: drh tags: trunk
11:50
Fix pager_end_transaction() to ensure that a ROLLBACK does not clobber unwritten pages in a TEMP file pcache. check-in: 9495d338 user: drh tags: trunk
04:24
Additional debugging and tracing logic for pcache.c, turned off by default using an "#if 0". check-in: 32a62e3b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pager.c.

2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
  }
#endif

  sqlite3BitvecDestroy(pPager->pInJournal);
  pPager->pInJournal = 0;
  pPager->nRec = 0;
  if( rc==SQLITE_OK ){
    if( pagerFlushOnCommit(pPager) ){
      sqlite3PcacheCleanAll(pPager->pPCache);
    }else{
      sqlite3PcacheClearWritable(pPager->pPCache);
    }
    sqlite3PcacheTruncate(pPager->pPCache, pPager->dbSize);
  }








|







2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
  }
#endif

  sqlite3BitvecDestroy(pPager->pInJournal);
  pPager->pInJournal = 0;
  pPager->nRec = 0;
  if( rc==SQLITE_OK ){
    if( !pPager->tempFile || (bCommit && pagerFlushOnCommit(pPager)) ){
      sqlite3PcacheCleanAll(pPager->pPCache);
    }else{
      sqlite3PcacheClearWritable(pPager->pPCache);
    }
    sqlite3PcacheTruncate(pPager->pPCache, pPager->dbSize);
  }