@@ -67687,9 +67687,11 @@ static int walCheckpoint(
6768767687 /* If work was actually accomplished... */
6768867688 if( rc==SQLITE_OK ){
6768967689 if( mxSafeFrame==walIndexHdr(pWal)->mxFrame ){
67690+ #ifndef LIBSQL_CHECKPOINT_ONLY_FULL
6769067691 if (xCb) {
6769167692 rc = (xCb)(pCbData, mxSafeFrame, NULL, 0, 0, 0);
6769267693 }
67694+ #endif
6769367695 if( rc==SQLITE_OK ){
6769467696 i64 szDb = pWal->hdr.nPage*(i64)szPage;
6769567697 testcase( IS_BIG_INT(szDb) );
@@ -67699,9 +67701,11 @@ static int walCheckpoint(
6769967701 rc = sqlite3OsSync(pWal->pDbFd, CKPT_SYNC_FLAGS(sync_flags));
6770067702 }
6770167703 }
67704+ #ifndef LIBSQL_CHECKPOINT_ONLY_FULL
6770267705 if( rc==SQLITE_OK ){
6770367706 AtomicStore(&pInfo->nBackfill, mxSafeFrame); SEH_INJECT_FAULT;
6770467707 }
67708+ #endif
6770567709 }
6770667710
6770767711 /* Release the reader lock held while backfilling */
@@ -67747,6 +67751,14 @@ static int walCheckpoint(
6774767751 ** indicate that the log file contains zero valid frames. */
6774867752 walRestartHdr(pWal, salt1);
6774967753 rc = sqlite3OsTruncate(pWal->pWalFd, 0);
67754+ #ifdef LIBSQL_CHECKPOINT_ONLY_FULL
67755+ if( rc==SQLITE_OK && xCb ){
67756+ rc = (xCb)(pCbData, mxSafeFrame, NULL, 0, 0, 0);
67757+ }
67758+ if( rc==SQLITE_OK ){
67759+ AtomicStore(&pInfo->nBackfill, mxSafeFrame); SEH_INJECT_FAULT;
67760+ }
67761+ #endif
6775067762 }
6775167763 walUnlockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
6775267764 }
0 commit comments