1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Refactor and simplify the logic used to change journalmode.

FossilOrigin-Name: 95cc3f6fdec5494560c3cd4439d06870d1c62506
This commit is contained in:
drh
2010-06-11 17:01:24 +00:00
parent 5130c31b0c
commit 0b9b4301b8
8 changed files with 135 additions and 98 deletions

View File

@@ -335,8 +335,7 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){
** and the page sizes are different between source and destination */
pgszSrc = sqlite3BtreeGetPageSize(p->pSrc);
pgszDest = sqlite3BtreeGetPageSize(p->pDest);
destMode = sqlite3PagerJournalMode(sqlite3BtreePager(p->pDest),
PAGER_JOURNALMODE_QUERY);
destMode = sqlite3PagerGetJournalMode(sqlite3BtreePager(p->pDest));
if( SQLITE_OK==rc && destMode==PAGER_JOURNALMODE_WAL && pgszSrc!=pgszDest ){
rc = SQLITE_READONLY;
}