mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-30 06:24:21 +01:00
fix/core/translate: ALTER TABLE DROP COLUMN: ensure schema cookie is updated even when target table is empty
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user