/ Check-in [345ce1c9]
Login

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

Overview
Comment:Do not reset the page cache when a rollback journal truncate fails, as doing so can cause loss of information for an in-memory TEMP file.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 345ce1c9f64f2a424663b4dfcbe4586d9df7bff6
User & Date: drh 2016-05-11 12:47:46
Context
2016-05-11
15:41
Remove some a small amount of redundant code related to PCache.pSynced from pcache.c. check-in: 9cc8cad7 user: dan tags: trunk
12:47
Do not reset the page cache when a rollback journal truncate fails, as doing so can cause loss of information for an in-memory TEMP file. check-in: 345ce1c9 user: drh tags: trunk
11:04
Always truncate, rather than persist, the rollback journal of a TEMP database. check-in: 42fb6f1e user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pager.c.

2028
2029
2030
2031
2032
2033
2034

2035
2036
2037
2038
2039
2040

2041
2042
2043
2044
2045
2046
2047
    }
  }
#endif

  sqlite3BitvecDestroy(pPager->pInJournal);
  pPager->pInJournal = 0;
  pPager->nRec = 0;

  if( MEMDB || pagerFlushOnCommit(pPager) ){
    sqlite3PcacheCleanAll(pPager->pPCache);
  }else{
    sqlite3PcacheClearWritable(pPager->pPCache);
  }
  sqlite3PcacheTruncate(pPager->pPCache, pPager->dbSize);


  if( pagerUseWal(pPager) ){
    /* Drop the WAL write-lock, if any. Also, if the connection was in 
    ** locking_mode=exclusive mode but is no longer, drop the EXCLUSIVE 
    ** lock held on the database file.
    */
    rc2 = sqlite3WalEndWriteTransaction(pPager->pWal);







>
|
|
|
|
|
|
>







2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
    }
  }
#endif

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

  if( pagerUseWal(pPager) ){
    /* Drop the WAL write-lock, if any. Also, if the connection was in 
    ** locking_mode=exclusive mode but is no longer, drop the EXCLUSIVE 
    ** lock held on the database file.
    */
    rc2 = sqlite3WalEndWriteTransaction(pPager->pWal);