MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / i1419_wal_probe

Function i1419_wal_probe

tests/test_pipeline.c:3563–3576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3561static atomic_int g_i1419_full_sync_commits;
3562
3563static int i1419_wal_probe(void *arg, sqlite3 *db, const char *db_name, int wal_frames) {
3564 (void)arg;
3565 atomic_fetch_add(&g_i1419_wal_commits, 1);
3566 sqlite3_stmt *stmt = NULL;
3567 if (sqlite3_prepare_v2(db, "PRAGMA synchronous;", -1, &stmt, NULL) == SQLITE_OK &&
3568 sqlite3_step(stmt) == SQLITE_ROW && sqlite3_column_int(stmt, 0) >= I1419_SYNC_FULL) {
3569 atomic_fetch_add(&g_i1419_full_sync_commits, 1);
3570 }
3571 sqlite3_finalize(stmt);
3572 if (wal_frames >= I1419_DEFAULT_AUTOCHECKPOINT) {
3573 (void)sqlite3_wal_checkpoint(db, db_name);
3574 }
3575 return SQLITE_OK;
3576}
3577
3578static int i1419_trace(unsigned type, void *ctx, void *stmt, void *sql) {
3579 (void)type;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected