fts5-integrity-check · shipping · also FTS5 external-content check

FTS5 integrity-check

FTS5 integrity-check validates full-text index structures and can also compare them with an external content table.

Related Observatory article: Read on hesela.com

For external content, rank=1 requests the additional comparison; a detected discrepancy raises SQLITE_CORRUPT_VTAB (267). [1]

Missed maintenance and the tested base-table REPLACE with recursive_triggers off left stale searches while PRAGMA and internal checks passed. Rank=1 rejected these states. Completed backup retained the mismatch; destination rebuild repaired current searches. [3] [4]

Consistency checking is not residual-content checking. In four internal-content deletion controls, all checks passed while residue differed: core secure_delete alone left shadow-token residue; FTS5 secure-delete alone left file residue; both removed this token from both scans. This is not the external-content synchronization fixture or a general forensic-erasure guarantee. [7]

Passing rank=1 does not prove historical text identity. Token-equivalent edits can pass. It also accepted unequal az/bq tokens through a checksum collision on SQLite 3.45.1 and 3.53.1; az/br was rejected. [10] [13]

Ordinary VACUUM renumbered an unindexed implicit-rowid content table. MATCH charlie returned hotel, PRAGMA/internal checks passed and rank=1 rejected 267. Rebuild restored searches, not original IDs. [15] [14]

Across 59 dependent states from 17 designed cases per build, 13 passed all three checks but failed historical-row or current-index comparison. Seven rebuilt states matched current text but not the old ID-to-text mapping. These are selected counterexamples, not failure rates. [16]

Relations

related
FTS5 external-content table, SQLite integrity_check, Backup verification

Limitations

  • A shadow-blob count is not a count of recovered documents. Postings and deletion markers can contain the same token. [5]
  • Rebuild follows current content rather than restoring original text. Compare preservation against a trusted prior reference. [10]
  • The external-content check can accept different token instances when its internal checksum collides. [13, 12]

Citations

  1. SQLite FTS5: external content and integrity checking (accessed 2026-10-18)
  2. Hesela: eight executed FTS5 states and full query results (accessed 2026-10-18)
  3. Hesela: four REPLACE/UPSERT cases with rollback, trigger events and full query results (accessed 2026-10-19)
  4. SQLite FTS5: secure-delete and version compatibility (accessed 2026-10-30)
  5. SQLite: core secure_delete and virtual-table limits (accessed 2026-10-30)
  6. Hesela: generated SQLite deletion observations, two retained runs and explicit limits (accessed 2026-10-30)
  7. SQLite FTS5: Unicode61 tokenization defaults (accessed 2026-10-31)
  8. Hesela: five-case text-preservation evidence on SQLite 3.45.1 and 3.53.1 (accessed 2026-10-31)
  9. SQLite 3.53.1 pinned entry-checksum implementation (accessed 2026-11-01)
  10. Hesela: three checksum controls on two SQLite builds (accessed 2026-11-01)
  11. SQLite: VACUUM and unaliased rowid changes (accessed 2026-11-01)
  12. Hesela: nine maintenance-identity cases on each of two SQLite builds (accessed 2026-11-01)
  13. Hesela: historical-row and current-index acceptance, 17 designed cases (accessed 2026-11-02)
  14. SQLite FTS5: instance vocabulary and token positions (accessed 2026-11-02)

Further reading

  1. Hesela: FTS5 query and verification controls (accessed 2026-10-18)
  2. Hesela: standalone SQLite deletion evidence, code and 42 raw files (accessed 2026-10-30)
  3. Hesela: exact evidence package, source map and replay limitations (accessed 2026-10-31)
Sources & caveats
  • Eight designed observations, five exact ASCII-token queries per state, SQLite 3.45.1. No physical corruption or power-loss test.
  • The deletion fixture scans exact token bytes without reconstructing complete records. [7]
  • Retained 3.45.1 and 3.53.1 outcomes agree for the same five fixtures; diagnostic and trace differences remain explicit. No independent peer review. [10]
  • Five one-row in-memory controls used unicode61, detail=full, columnsize=1 and no maintenance triggers. Minus/accent edits passed; changed-token/position controls failed. No physical-corruption or incident-rate measurement. [10] [9]
  • Three one-row in-memory checksum controls were executed on two builds; complete diagnostics, query answers, copy and rebuild states retained. Not independent peer review. [13]
  • Nine designed maintenance cases per build, closed DELETE journal and no concurrent writer. Independent source/prose review only; no independent native replication or incident-rate estimate. [15]
  • The acceptance demonstrator uses fixed TEXT-only, unicode61, detail=full fixtures and a fresh index in the same SQLite engine. The baseline is known original input, not independently authenticated history or a general production checker. [16] [17]
  • FTS5 secure-delete can affect readers older than 3.42.0 after updates or deletions; the deletion experiment did not test older readers or physical media. [5] [6]

JSON: /data/terms/fts5-integrity-check.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. FTS5 integrity-check. Hesela. 2026-11-02. https://hesela.dev/terms/fts5-integrity-check/