From d9ea3be4b84c7b3c5d47f67e2d6ebf80530e70f3 Mon Sep 17 00:00:00 2001 From: Nikita Sivukhin Date: Mon, 27 Oct 2025 18:19:14 +0400 Subject: [PATCH] forbid usage of IndexMethod in insert/delete loops --- core/translate/emitter.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/translate/emitter.rs b/core/translate/emitter.rs index db84007f0..3c95f028a 100644 --- a/core/translate/emitter.rs +++ b/core/translate/emitter.rs @@ -670,6 +670,9 @@ fn emit_delete_insns( index: Some(index), .. } => program.resolve_cursor_id(&CursorKey::index(internal_id, index.clone())), }, + Operation::IndexMethodQuery(_) => { + panic!("access through IndexMethod is not supported for delete statements") + } }; let main_table_cursor_id = program.resolve_cursor_id(&CursorKey::table(internal_id)); @@ -1087,6 +1090,9 @@ fn emit_update_insns( false, ), }, + Operation::IndexMethodQuery(_) => { + panic!("access through IndexMethod is not supported for update operations") + } }; let beg = program.alloc_registers(