diff options
author | drh <drh@noemail.net> | 2010-07-08 19:19:51 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-07-08 19:19:51 +0000 |
commit | a485cccd0a6cb50b44d6837aff53f795f5bc779f (patch) | |
tree | 7ccde249141f8294b065ef28fe821ab97fea4f3b /src | |
parent | afdc5fa5cc190483755403498f09020781b935a0 (diff) | |
download | sqlite-a485cccd0a6cb50b44d6837aff53f795f5bc779f.tar.gz sqlite-a485cccd0a6cb50b44d6837aff53f795f5bc779f.zip |
Add a test case to cover code that was left untested by the journal_mode
simplification.
FossilOrigin-Name: bcdddba4f011cf008d29918bcac59131007a8138
Diffstat (limited to 'src')
-rw-r--r-- | src/pager.c | 9 |
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 |