diff options
author | drh <drh@noemail.net> | 2011-08-25 20:18:47 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-08-25 20:18:47 +0000 |
commit | c5dbffe741f0a6483135f314386eb66cd95bac0b (patch) | |
tree | 5b3da2f9712aafddcb8fcf159c8c49cb5d0ecbb0 /src/backup.c | |
parent | 4b2704021a4984b60e1514401b4cddfb52e26bf3 (diff) | |
download | sqlite-c5dbffe741f0a6483135f314386eb66cd95bac0b.tar.gz sqlite-c5dbffe741f0a6483135f314386eb66cd95bac0b.zip |
Reorder some of the branches in backup.c in order to make the code
easier to test.
FossilOrigin-Name: 2c443d47ecee7b43a89f0a4bf299c46c66e3f80d
Diffstat (limited to 'src/backup.c')
-rw-r--r-- | src/backup.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/backup.c b/src/backup.c index 9a43f670c..70a782665 100644 --- a/src/backup.c +++ b/src/backup.c @@ -410,16 +410,16 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){ ** the case where the source and destination databases have the ** same schema version. */ - if( rc==SQLITE_DONE - && (rc = sqlite3BtreeUpdateMeta(p->pDest,1,p->iDestSchema+1))==SQLITE_OK - ){ - if( p->pDestDb ){ - sqlite3ResetInternalSchema(p->pDestDb, -1); - } - if( destMode==PAGER_JOURNALMODE_WAL ){ - rc = sqlite3BtreeSetVersion(p->pDest, 2); + if( rc==SQLITE_DONE ){ + rc = sqlite3BtreeUpdateMeta(p->pDest,1,p->iDestSchema+1); + if( rc==SQLITE_OK ){ + if( p->pDestDb ){ + sqlite3ResetInternalSchema(p->pDestDb, -1); + } + if( destMode==PAGER_JOURNALMODE_WAL ){ + rc = sqlite3BtreeSetVersion(p->pDest, 2); + } } - if( rc==SQLITE_OK ){ int nDestTruncate; /* Set nDestTruncate to the final number of pages in the destination |