| 3561 | static atomic_int g_i1419_full_sync_commits; |
| 3562 | |
| 3563 | static 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 | |
| 3578 | static int i1419_trace(unsigned type, void *ctx, void *stmt, void *sql) { |
| 3579 | (void)type; |
nothing calls this directly
no outgoing calls
no test coverage detected