summaryrefslogtreecommitdiffstats
path: root/lib/libsqlite3/src/backup.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libsqlite3/src/backup.c')
-rw-r--r--lib/libsqlite3/src/backup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libsqlite3/src/backup.c b/lib/libsqlite3/src/backup.c
index 94e578d9df0..69e3c528228 100644
--- a/lib/libsqlite3/src/backup.c
+++ b/lib/libsqlite3/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