Fix max_frame determination and comments in WAL checkpointing

This commit is contained in:
PThorpe92
2025-08-12 08:57:08 -04:00
parent b82d850f7a
commit c3b536957f
4 changed files with 79 additions and 90 deletions

View File

@@ -1328,10 +1328,10 @@ pub unsafe extern "C" fn sqlite3_wal_checkpoint_v2(
match db.conn.checkpoint(chkptmode) {
Ok(res) => {
if !log_size.is_null() {
(*log_size) = res.num_wal_frames as ffi::c_int;
(*log_size) = res.num_attempted as ffi::c_int;
}
if !checkpoint_count.is_null() {
(*checkpoint_count) = res.num_checkpointed_frames as ffi::c_int;
(*checkpoint_count) = res.num_backfilled as ffi::c_int;
}
SQLITE_OK
}