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: FTS5 integrity-check on hesela.com

For external content, rank=1 requests the additional comparison and a detected discrepancy raises SQLITE_CORRUPT_VTAB. [1]

Five deliberately inconsistent states passed both PRAGMA checks and the internal FTS5 check but failed the external comparison with code 267. A completed backup retained the stale query results. Rebuilding the destination index restored the expected answers without changing the source. [2] [3]

A second experiment retained every maintenance trigger. Base-table REPLACE with recursive_triggers off left an old-token match while PRAGMA and internal FTS5 checks passed; the external comparison rejected it. With recursive triggers on, or with the tested DO UPDATE UPSERT, all checks and expected queries passed. Explicit rollback restored baseline rows, queries and file hashes in all four controls. [4]

Relations

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

Citations

  1. SQLite FTS5: external content and integrity checking (accessed 2026-10-18)
  2. Hesela: FTS5 query and verification controls (accessed 2026-10-18)
  3. Hesela: eight executed FTS5 states and full query results (accessed 2026-10-18)
  4. Hesela: four REPLACE/UPSERT cases with rollback, trigger events and full query results (accessed 2026-10-19)
Sources & caveats
  • Eight designed observations, five exact ASCII-token queries per state, SQLite 3.45.1. No physical corruption or power-loss test.

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-10-19. https://hesela.dev/terms/fts5-integrity-check/