diff options
author | drh <drh@noemail.net> | 2015-02-21 00:19:25 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-02-21 00:19:25 +0000 |
commit | ad0961b31b11f210aeb85803788e4b401d6ba85c (patch) | |
tree | 6695104a928ad127c0f8f0ea116c311c60b54e0c /src/attach.c | |
parent | db222adfd3620e797d9cea7de60b520c33c7ce76 (diff) | |
download | sqlite-ad0961b31b11f210aeb85803788e4b401d6ba85c.tar.gz sqlite-ad0961b31b11f210aeb85803788e4b401d6ba85c.zip |
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
Diffstat (limited to 'src/attach.c')
-rw-r--r-- | src/attach.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/attach.c b/src/attach.c index de8742938..7e35fa67c 100644 --- a/src/attach.c +++ b/src/attach.c @@ -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; |