mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +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:
14
src/pager.c
14
src/pager.c
@@ -2116,6 +2116,20 @@ static void pagerReportSize(Pager *pPager){
|
||||
# define pagerReportSize(X) /* No-op if we do not support a codec */
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_HAS_CODEC
|
||||
/*
|
||||
** Make sure the number of reserved bits is the same in the destination
|
||||
** pager as it is in the source. This comes up when a VACUUM changes the
|
||||
** number of reserved bits to the "optimal" amount.
|
||||
*/
|
||||
void sqlite3PagerAlignReserve(Pager *pDest, Pager *pSrc){
|
||||
if( pDest->nReserve!=pSrc->nReserve ){
|
||||
pDest->nReserve = pSrc->nReserve;
|
||||
pagerReportSize(pDest);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Read a single page from either the journal file (if isMainJrnl==1) or
|
||||
** from the sub-journal (if isMainJrnl==0) and playback that page.
|
||||
|
Reference in New Issue
Block a user