mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-15 14:14:20 +01:00
Merge 'core/vdbe: Fix incorrect unreachable condition in op_seek_rowid' from Preston Thorpe
closes https://github.com/tursodatabase/turso-go/issues/55 In `apply_affinity_char`: we have things like the following: ```rust if matches!(value, Value::Blob(_)) { return true; } ```` Then at the call site in `op_seek_rowid` in execute.rs, we were saying it was an unreachable condition that a blob was in the register.. ```rust let converted = apply_affinity_char(&mut temp_reg, Affinity::Numeric); if converted { match temp_reg.get_value() { Value::Integer(i) => Some(*i), Value::Float(f) => Some(*f as i64), _ => unreachable!(), } ``` Closes #3897
This commit is contained in:
@@ -2967,7 +2967,7 @@ pub fn op_seek_rowid(
|
||||
match temp_reg.get_value() {
|
||||
Value::Integer(i) => Some(*i),
|
||||
Value::Float(f) => Some(*f as i64),
|
||||
_ => unreachable!("apply_affinity_char with Numeric should produce an integer if it returns true"),
|
||||
_ => None,
|
||||
}
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user