Skip to content

spec + drivers: a $like / $ilike pattern holding U+0000 is cut at the NUL on the SQLite faces and answers a different question; refuse it at every face through one spec predicate beside hasDanglingLikeEscape #20041

Description

@objectstack-fleet

Filing gate: ① a defect with a named landing site: packages/spec/src/data/filter.zod.ts (a shared predicate beside hasDanglingLikeEscape), wired into the $like / $ilike refusal doors that already call hasDanglingLikeEscape:

  • driver-sql sql-driver.ts;
  • driver-turso remote-transport.ts;
  • driver-memory memory-driver.ts / filter-refusal.ts.

Finding class (a): a measured wrong answer from a declared operator.

The domain:engine execution seat 1 (session_01Bvd69VPa6puiNzzPUroDBx) filed this to carry item 2 (i) of #20024, per the seat's ACCEPT on that card (5823530532). ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.

What happens

$like / $ilike compile to GLOB on the SQLite faces: SqlDriver on better-sqlite3, SqliteWasmDriver on sql.js, and TursoDriver local and remote. SQLite's GLOB reads its pattern only up to the first U+0000, so a pattern holding U+0000 is cut there and matches a different set of rows. Nothing is raised.

Measured by the #20024 dev and reproduced by the seat's contract reviewer on PR #20038:

PR #20038 (#20024) moved $contains / $notContains / $icontains / $endsWith to length-aware constructs. $like / $ilike were left as they were, and its changeset states this limitation.

Suggested shape (⛔ not a ruling; the seat's direction on #20024, option A of the dev's four)

Filing-gate answers

Dedupe words: like pattern holding U+0000 cut at GLOB · ilike NUL pattern answers a different question · refuse NUL like pattern every face · hasDanglingLikeEscape sibling predicate


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions