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

Import experimental write-ahead-logging code.

FossilOrigin-Name: 409d61baeb0a19d1700c973f16c8acef7b8506cd
This commit is contained in:
dan
2010-04-12 19:00:29 +00:00
parent eada58aa49
commit 7c24610e64
14 changed files with 2772 additions and 231 deletions

View File

@@ -5186,6 +5186,21 @@ case OP_AggFinal: {
break;
}
/* Opcode: Checkpoint P1 P2 P3 * P5
*/
case OP_Checkpoint: {
Btree *pBt; /* Btree to checkpoint */
int nMin = pOp->p2; /* Minimum number of pages to copy */
int nMax = pOp->p3; /* Maximum number of pages to copy */
int doNotSync = pOp->p5; /* True to sync database */
assert( pOp->p1>=0 && pOp->p1<db->nDb );
assert( (p->btreeMask & (1<<pOp->p1))!=0 );
pBt = db->aDb[pOp->p1].pBt;
rc = sqlite3PagerCheckpoint(sqlite3BtreePager(pBt), nMin, nMax, !doNotSync);
break;
};
#if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)
/* Opcode: Vacuum * * * * *