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

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
This commit is contained in:
drh
2015-09-23 19:17:23 +00:00
parent 64ff56f91a
commit 58cb6dbe0d
5 changed files with 30 additions and 9 deletions

View File

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