mirror of
https://github.com/allankoechke/turso.git
synced 2026-11-30 11:12:58 +00:00
`IS` is an index-usable equality that also matches NULL, but no fuzzer emitted it, so the seek path it now drives had no randomized coverage at all. The two outer-join predicate bugs fixed in the previous commit were both found this way. - `index_scan_compound_key_fuzz`: `IS` joins `=` in the equality prefix, so seek keys mix the two across the DESC/ASC index permutations. It already inserts NULLs in every key position; `IS` raises the NULL-literal rate to 1-in-3 because a NULL key is the case worth hitting. - `index_scan_fuzz`: three NULL rows, which a UNIQUE index accepts, plus a NULL probe value — `x IS NULL` must find all three where `=` finds none. - `rowid_seek_fuzz`: `=` and `IS` over the existing mixed-type value set, so the rowid seek's affinity handling is exercised for both. - `join.rs`: `IS` in ON clauses and against literals in WHERE. - `sql_generation`, `sql_gen`: `IS` predicates for the simulator, and `IS`/`IS NOT` promoted out of the never-generated stub list. The `.sqltest` file gains the cases the operator's semantics turn on and that the original set missed: several rows sharing one NULL key component, a descending index, a rowid that `IS NULL` must never match, and the antijoin `LEFT JOIN ... WHERE e.id IS NULL`, which returns every left row if the WHERE term is allowed to constrain the right-hand table's loop. Tests: all expectations checked against sqlite3 3.53.3. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>