core/vdbe: Improve IdxDelete error messages with context

We currently return the exact same error from two different IdxDelete
paths. Improve the messages with context about what we're doing to make
this error more debuggable.
This commit is contained in:
Pekka Enberg
2025-10-13 09:40:37 +03:00
parent eb000c3d0f
commit 2a02cafc73

View File

@@ -6200,7 +6200,7 @@ pub fn op_idx_delete(
.map(|i| &state.registers[i])
.collect::<Vec<_>>();
return Err(LimboError::Corrupt(format!(
"IdxDelete: no matching index entry found for key {reg_values:?}"
"IdxDelete: no matching index entry found for key {reg_values:?} while seeking"
)));
}
state.pc += 1;
@@ -6221,7 +6221,7 @@ pub fn op_idx_delete(
.map(|i| &state.registers[i])
.collect::<Vec<_>>();
return Err(LimboError::Corrupt(format!(
"IdxDelete: no matching index entry found for key {reg_values:?}"
"IdxDelete: no matching index entry found for key while verifying: {reg_values:?}"
)));
}
state.op_idx_delete_state = Some(OpIdxDeleteState::Deleting);