mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-31 05:44:25 +01:00
fix(core/vdbe):pass largest value from table to op_new_rowid
This commit is contained in:
@@ -6412,7 +6412,7 @@ pub fn op_new_rowid(
|
||||
NewRowid {
|
||||
cursor,
|
||||
rowid_reg,
|
||||
..
|
||||
prev_largest_reg,
|
||||
},
|
||||
insn
|
||||
);
|
||||
@@ -6455,6 +6455,11 @@ pub fn op_new_rowid(
|
||||
return_if_io!(cursor.rowid())
|
||||
};
|
||||
|
||||
if *prev_largest_reg > 0 {
|
||||
state.registers[*prev_largest_reg] =
|
||||
Register::Value(Value::Integer(current_max.unwrap_or(0)));
|
||||
}
|
||||
|
||||
match current_max {
|
||||
Some(rowid) if rowid < MAX_ROWID => {
|
||||
// Can use sequential
|
||||
|
||||
Reference in New Issue
Block a user