1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Reorder some of the branches in backup.c in order to make the code

easier to test.

FossilOrigin-Name: 2c443d47ecee7b43a89f0a4bf299c46c66e3f80d
This commit is contained in:
drh
2011-08-25 20:18:47 +00:00
parent 4b2704021a
commit c5dbffe741
3 changed files with 17 additions and 17 deletions

View File

@@ -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( 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( 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