/ Check-in [42fb6f1e]
Login

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

Overview
Comment:Always truncate, rather than persist, the rollback journal of a TEMP database.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:42fb6f1e99a6c31889819a0302679d598dc0ab1b
User & Date: drh 2016-05-11 11:04:17
Context
2016-05-11
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
10:57
Add pcache tracing macros. Off by default. Requires changing an "#if 0" and recompiling to enable. check-in: d9313d19 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

  1993   1993             rc = sqlite3OsSync(pPager->jfd, pPager->syncFlags);
  1994   1994           }
  1995   1995         }
  1996   1996         pPager->journalOff = 0;
  1997   1997       }else if( pPager->journalMode==PAGER_JOURNALMODE_PERSIST
  1998   1998         || (pPager->exclusiveMode && pPager->journalMode!=PAGER_JOURNALMODE_WAL)
  1999   1999       ){
  2000         -      rc = zeroJournalHdr(pPager, hasMaster);
         2000  +      rc = zeroJournalHdr(pPager, hasMaster||pPager->tempFile);
  2001   2001         pPager->journalOff = 0;
  2002   2002       }else{
  2003   2003         /* This branch may be executed with Pager.journalMode==MEMORY if
  2004   2004         ** a hot-journal was just rolled back. In this case the journal
  2005   2005         ** file should be closed and deleted. If this connection writes to
  2006   2006         ** the database file, it will do so using an in-memory journal.
  2007   2007         */