Index: src/main.c ================================================================== --- src/main.c +++ src/main.c @@ -1779,18 +1779,22 @@ int sqlite3_ckpt_open( sqlite3 *db, unsigned char *a, int n, sqlite3_ckpt **ppCkpt ){ - Pager *pPager; - Btree *pBt; + Pager *pPager = 0; int rc; *ppCkpt = 0; sqlite3_mutex_enter(db->mutex); - pBt = db->aDb[0].pBt; - pPager = sqlite3BtreePager(pBt); + + /* Find the Pager object. */ + rc = sqlite3_file_control(db,"main",SQLITE_FCNTL_ZIPVFS_PAGER,(void*)&pPager); + if( rc!=SQLITE_OK ){ + pPager = sqlite3BtreePager(db->aDb[0].pBt); + } + rc = sqlite3PagerWalCheckpointStart(db, pPager, a, n, ppCkpt); sqlite3_mutex_leave(db->mutex); return rc; } Index: src/sqlite.h.in ================================================================== --- src/sqlite.h.in +++ src/sqlite.h.in @@ -939,10 +939,14 @@ ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This ** opcode causes the xFileControl method to swap the file handle with the one ** pointed to by the pArg argument. This capability is used during testing ** and only needs to be supported when SQLITE_TEST is defined. ** +**