update nchanges on op_insert

This commit is contained in:
Pere Diaz Bou
2025-06-23 18:11:58 +02:00
parent c7e9b3a546
commit b7fd4f1e18

View File

@@ -4260,14 +4260,12 @@ pub fn op_insert(
if let Some(rowid) = return_if_io!(cursor.rowid()) {
program.connection.update_last_rowid(rowid);
// n_change is increased when Insn::Delete is executed, so we can skip for Insn::Insert
if !flag.has(InsertFlags::UPDATE) {
let prev_changes = program.n_change.get();
program.n_change.set(prev_changes + 1);
}
let prev_changes = program.n_change.get();
program.n_change.set(prev_changes + 1);
}
}
}
state.pc += 1;
Ok(InsnFunctionStepResult::Step)
}