1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Add an API to support custom page cache implementations. (CVS 5899)

FossilOrigin-Name: 47866d6708e9b69e367937fd85f93580fd025447
This commit is contained in:
danielk1977
2008-11-13 14:28:28 +00:00
parent 0d0654119f
commit bc2ca9eb39
12 changed files with 1166 additions and 935 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.534 2008/11/12 18:21:36 danielk1977 Exp $
** $Id: btree.c,v 1.535 2008/11/13 14:28:29 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -2603,9 +2603,14 @@ void sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode){
BtCursor *p;
sqlite3BtreeEnter(pBtree);
for(p=pBtree->pBt->pCursor; p; p=p->pNext){
int i;
sqlite3BtreeClearCursor(p);
p->eState = CURSOR_FAULT;
p->skip = errCode;
for(i=0; i<=p->iPage; i++){
releasePage(p->apPage[i]);
p->apPage[i] = 0;
}
}
sqlite3BtreeLeave(pBtree);
}
@@ -5615,7 +5620,8 @@ static int balance_deeper(BtCursor *pCur){
cdata = pChild->aData;
memcpy(cdata, &data[hdr], pPage->cellOffset+2*pPage->nCell-hdr);
memcpy(&cdata[cbrk], &data[cbrk], usableSize-cbrk);
assert( pChild->isInit==0 );
rc = sqlite3BtreeInitPage(pChild);
if( rc==SQLITE_OK ){
int nCopy = pPage->nOverflow*sizeof(pPage->aOvfl[0]);