mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Move codec management from database connections into the pager so that it
will work together with shared cache. (CVS 6782) FossilOrigin-Name: ed08b53cd64c4ff2c94ef4e48441c5236041c9ca
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** $Id: btree.c,v 1.635 2009/06/18 11:29:21 drh Exp $
|
||||
** $Id: btree.c,v 1.636 2009/06/18 17:22:39 drh Exp $
|
||||
**
|
||||
** This file implements a external (disk-based) database using BTrees.
|
||||
** See the header comment on "btreeInt.h" for additional information.
|
||||
@@ -1589,7 +1589,7 @@ int sqlite3BtreeOpen(
|
||||
pBt->incrVacuum = (get4byte(&zDbHeader[36 + 7*4])?1:0);
|
||||
#endif
|
||||
}
|
||||
rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize);
|
||||
rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve);
|
||||
if( rc ) goto btree_open_out;
|
||||
pBt->usableSize = pBt->pageSize - nReserve;
|
||||
assert( (pBt->pageSize & 7)==0 ); /* 8-byte alignment of pageSize */
|
||||
@@ -1880,8 +1880,8 @@ int sqlite3BtreeSetPageSize(Btree *p, int pageSize, int nReserve, int iFix){
|
||||
assert( !pBt->pPage1 && !pBt->pCursor );
|
||||
pBt->pageSize = (u16)pageSize;
|
||||
freeTempSpace(pBt);
|
||||
rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize);
|
||||
}
|
||||
rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve);
|
||||
pBt->usableSize = pBt->pageSize - (u16)nReserve;
|
||||
if( iFix ) pBt->pageSizeFixed = 1;
|
||||
sqlite3BtreeLeave(p);
|
||||
@@ -2036,7 +2036,8 @@ static int lockBtree(BtShared *pBt){
|
||||
pBt->usableSize = (u16)usableSize;
|
||||
pBt->pageSize = (u16)pageSize;
|
||||
freeTempSpace(pBt);
|
||||
rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize);
|
||||
rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize,
|
||||
pageSize-usableSize);
|
||||
if( rc ) goto page1_init_failed;
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user