aboutsummaryrefslogtreecommitdiff
path: root/src/backup.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-09-23 19:17:23 +0000
committerdrh <drh@noemail.net>2015-09-23 19:17:23 +0000
commit58cb6dbe0d9d32386a61fba1812dfbacc594aa46 (patch)
treed193d937d1556b61c25849770562a27d9f1b0ebe /src/backup.c
parent64ff56f91aead7ba1d27421e5a6d5b050e9dd533 (diff)
downloadsqlite-58cb6dbe0d9d32386a61fba1812dfbacc594aa46.tar.gz
sqlite-58cb6dbe0d9d32386a61fba1812dfbacc594aa46.zip
Take care that the number of reserved bits per page is consistent between
the source and destination databases when doing the back-copy on a VACUUM. FossilOrigin-Name: 5b61b72f5424a2d9bb4e68eb95026cd63f003db9
Diffstat (limited to 'src/backup.c')
-rw-r--r--src/backup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backup.c b/src/backup.c
index 94e578d9d..69e3c5282 100644
--- a/src/backup.c
+++ b/src/backup.c
@@ -769,6 +769,10 @@ int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
b.pDest = pTo;
b.iNext = 1;
+#ifdef SQLITE_HAS_CODEC
+ sqlite3PagerAlignReserve(sqlite3BtreePager(pTo), sqlite3BtreePager(pFrom));
+#endif
+
/* 0x7FFFFFFF is the hard limit for the number of pages in a database
** file. By passing this as the number of pages to copy to
** sqlite3_backup_step(), we can guarantee that the copy finishes