mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +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:
@@ -191,7 +191,7 @@ static void attachFunc(
|
||||
case SQLITE_NULL:
|
||||
/* No key specified. Use the key from the main database */
|
||||
sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey);
|
||||
if( nKey>0 || sqlite3BtreeGetReserve(db->aDb[0].pBt)>0 ){
|
||||
if( nKey>0 || sqlite3BtreeGetOptimalReserve(db->aDb[0].pBt)>0 ){
|
||||
rc = sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user