1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

When trying to transition from journal_mode MEMORY to WAL, use OFF as an

intermediate journal mode.

FossilOrigin-Name: 4775b8f9a9d9b66fcd5abf3af111fcad249e662e
This commit is contained in:
drh
2010-06-22 14:49:39 +00:00
parent 68928b6c3e
commit 242c4f7702
3 changed files with 22 additions and 8 deletions

View File

@@ -5249,6 +5249,10 @@ case OP_JournalMode: { /* out2-prerelease */
if( rc==SQLITE_OK ){
sqlite3PagerSetJournalMode(pPager, eNew);
}
}else if( eOld==PAGER_JOURNALMODE_MEMORY ){
/* Cannot transition directly from MEMORY to WAL. Use mode OFF
** as an intermediate */
sqlite3PagerSetJournalMode(pPager, PAGER_JOURNALMODE_OFF);
}
/* Open a transaction on the database file. Regardless of the journal