mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Fix: aggregate regs must be initialized as NULL at the start
This commit is contained in:
parent
5af837d50a
commit
f8257df77b
5 changed files with 63 additions and 18 deletions
|
@ -248,6 +248,19 @@ impl ProgramBuilder {
|
|||
reg
|
||||
}
|
||||
|
||||
pub fn alloc_registers_and_init_w_null(&mut self, amount: usize) -> usize {
|
||||
let reg = self.alloc_registers(amount);
|
||||
self.emit_insn(Insn::Null {
|
||||
dest: reg,
|
||||
dest_end: if amount == 1 {
|
||||
None
|
||||
} else {
|
||||
Some(reg + amount - 1)
|
||||
},
|
||||
});
|
||||
reg
|
||||
}
|
||||
|
||||
pub fn alloc_cursor_id_keyed(&mut self, key: CursorKey, cursor_type: CursorType) -> usize {
|
||||
assert!(
|
||||
!self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue