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:
18
src/backup.c
18
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( 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
|
||||
|
Reference in New Issue
Block a user