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

Keep track of the optimal number of reserved bytes (by looking at reserve

byte requests in calls to sqlite3BtreeSetPageSize()) and then change the
reserve byte count to the optimal when doing a VACUUM or when using the
backup API.

FossilOrigin-Name: 28c2b726285ea88b334acfd6390a057d2d244838
This commit is contained in:
drh
2015-02-21 00:19:25 +00:00
parent db222adfd3
commit ad0961b31b
9 changed files with 45 additions and 28 deletions

View File

@@ -247,7 +247,7 @@ static int backupOnePage(
** guaranteed that the shared-mutex is held by this thread, handle
** p->pSrc may not actually be the owner. */
int nSrcReserve = sqlite3BtreeGetReserveNoMutex(p->pSrc);
int nDestReserve = sqlite3BtreeGetReserve(p->pDest);
int nDestReserve = sqlite3BtreeGetOptimalReserve(p->pDest);
#endif
int rc = SQLITE_OK;
i64 iOff;