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

A backup must clear the internal schema of the destination database so

that the schema will be reloaded for the next sqlite3_prepare() (CVS 6247)

FossilOrigin-Name: 76f23a4394574e31f237e55c641bc70534f44d97
This commit is contained in:
drh
2009-02-03 22:17:42 +00:00
parent 662c58c9ba
commit 6231286dfe
4 changed files with 13 additions and 12 deletions

View File

@@ -12,7 +12,7 @@
** This file contains the implementation of the sqlite3_backup_XXX()
** API functions and the related features.
**
** $Id: backup.c,v 1.2 2009/02/03 21:13:08 drh Exp $
** $Id: backup.c,v 1.3 2009/02/03 22:17:42 drh Exp $
*/
#include "sqliteInt.h"
#include "btreeInt.h"
@@ -324,6 +324,7 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){
** same schema version.
*/
sqlite3BtreeUpdateMeta(p->pDest, 1, p->iDestSchema+1);
sqlite3ResetInternalSchema(p->pDestDb, 0);
/* Set nDestTruncate to the final number of pages in the destination
** database. The complication here is that the destination page