Commit cbff5e1
fix(planner): apply the COLLATE-mismatch seek check to range bounds too
A range bound whose explicit COLLATE differs from the column's collation
(`b > 'x' COLLATE NOCASE` over a BINARY index) now scans like SQLite instead of
seeking the index, and a BETWEEN keeps only the bound whose collation matches
(`b BETWEEN 'a' COLLATE NOCASE AND 'z'` → seek `b < 'z'` only). Mirrors the
equality fix, in the shared collect_range_constraints, so the executor seek and
the EQP label stay in lockstep. (`IN (…) COLLATE` is left as-is — SQLite still
seeks there.)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1c4d065 commit cbff5e1
3 files changed
Lines changed: 35 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
485 | | - | |
486 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
487 | 489 | | |
488 | 490 | | |
489 | 491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30363 | 30363 | | |
30364 | 30364 | | |
30365 | 30365 | | |
| 30366 | + | |
| 30367 | + | |
| 30368 | + | |
| 30369 | + | |
| 30370 | + | |
| 30371 | + | |
| 30372 | + | |
30366 | 30373 | | |
30367 | | - | |
| 30374 | + | |
| 30375 | + | |
| 30376 | + | |
30368 | 30377 | | |
30369 | 30378 | | |
30370 | 30379 | | |
30371 | | - | |
| 30380 | + | |
| 30381 | + | |
| 30382 | + | |
30372 | 30383 | | |
30373 | 30384 | | |
30374 | 30385 | | |
| |||
30378 | 30389 | | |
30379 | 30390 | | |
30380 | 30391 | | |
| 30392 | + | |
| 30393 | + | |
30381 | 30394 | | |
30382 | | - | |
| 30395 | + | |
30383 | 30396 | | |
30384 | 30397 | | |
30385 | | - | |
| 30398 | + | |
30386 | 30399 | | |
30387 | 30400 | | |
30388 | 30401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
| |||
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
105 | 119 | | |
106 | 120 | | |
107 | 121 | | |
| |||
0 commit comments