mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-06 17:54:20 +01:00
```console thread 'fuzz::tests::logical_expression_fuzz_run' panicked at tests\integration\fuzz\mod.rs:818:13: assertion `left == right` failed: query: SELECT ( ( 3622873 || -8851250 ) * ( ( ( -124 ) + ( -5792536 ) ) ) ) = ( 179434259456392 < 65481085924370 ), limbo: [[Integer(1)]], sqlite: [[Integer(0)]] left: [[Integer(1)]] right: [[Integer(0)]] ``` This and a few other failing fuzzing tests were due to incorrectly parsing numerics from strings. Some of our casting was done properly, but it wasn't being applied to all cases where the behavior was needed. It was also attempting to parse a string[0..N] N times until `string[0..N].parse()` would no longer succeed. This searches for the index of the first illegal character and parses the resulting slice once. Tests were added for some of the edgecases that were previously failing. This PR also adds a macro in vdbe/insn.rs that allows for a bit of cleanup and reduces some matching. Closes #1053