add some comments

This commit is contained in:
pedrocarlo
2025-06-29 17:37:46 -03:00
parent ae569fbd7d
commit 7e0225b1af
2 changed files with 4 additions and 0 deletions

View File

@@ -1067,6 +1067,9 @@ fn emit_update_insns(
});
}
// If we are updating the rowid, we cannot rely on overwrite on the
// Insert instruction to update the cell. We need to first delete the current cell
// and later insert the updated record
if has_user_provided_rowid {
program.emit_insn(Insn::Delete { cursor_id });
}

View File

@@ -293,6 +293,7 @@ pub fn prepare_update_plan(
.joined_tables()
.first()
.unwrap();
// We do not need to emit an ephemeral plan if we are not going to loop over the table values
if matches!(table.op, Operation::Search(Search::RowidEq { .. })) {
(None, vec![])
} else {