aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pager.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pager.c b/src/pager.c
index 4432f29f7..c972440df 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -5880,12 +5880,11 @@ int sqlite3PagerSetJournalMode(Pager *pPager, int eMode){
|| eMode==PAGER_JOURNALMODE_WAL
|| eMode==PAGER_JOURNALMODE_MEMORY );
- /* Do not allow the journalmode of a TEMP database to be changed to WAL
+ /* This routine is only called from the OP_JournalMode opcode, and
+ ** the logic there will never allow a temporary file to be changed
+ ** to WAL mode.
*/
- if( pPager->tempFile && eMode==PAGER_JOURNALMODE_WAL ){
- assert( eOld!=PAGER_JOURNALMODE_WAL );
- eMode = eOld;
- }
+ assert( pPager->tempFile==0 || eMode!=PAGER_JOURNALMODE_WAL );
/* Do allow the journalmode of an in-memory database to be set to
** anything other than MEMORY or OFF