fix/core/translate: ALTER TABLE DROP COLUMN: ensure schema cookie is updated even when target table is empty

This commit is contained in:
Jussi Saurio
2025-08-04 15:04:39 +03:00
parent deec70e541
commit 8a1723b3c8

View File

@@ -139,12 +139,6 @@ pub fn translate_alter_table(
dest_reg: record,
index_name: None,
});
program.emit_insn(Insn::SetCookie {
db: 0,
cookie: Cookie::SchemaVersion,
value: schema.schema_version as i32 + 1,
p5: 0,
});
program.emit_insn(Insn::Insert {
cursor: cursor_id,
@@ -155,6 +149,13 @@ pub fn translate_alter_table(
});
});
program.emit_insn(Insn::SetCookie {
db: 0,
cookie: Cookie::SchemaVersion,
value: schema.schema_version as i32 + 1,
p5: 0,
});
program.emit_insn(Insn::ParseSchema {
db: usize::MAX, // TODO: This value is unused, change when we do something with it
where_clause: None,