SQLITE_CORRUPT_INDEX: index entry missing
SQLite found an index that is missing an entry for a row. Running REINDEX may repair it, if nothing else in the file is damaged.
- Result code
SQLITE_CORRUPT_INDEX- Name
779- Category
- Extended result codes
What it means
SQLITE_CORRUPT_INDEX (779) is a special case of SQLITE_CORRUPT: an entry is or was missing from an index. Because indexes can be rebuilt from their tables, the SQLite documentation notes that REINDEX may fix the problem as long as there is no other damage.
A common cause is changing a collation or a function used by an index (for example after upgrading an extension) so that existing index entries no longer sort the way SQLite expects.
Common causes
- A custom collation or deterministic function used by an index changed its behavior.
- General file damage that happened to hit an index page.
How to fix it
-
Rebuild the indexes, then check the whole file.
REINDEX; PRAGMA integrity_check;
-
If the integrity check still reports problems, treat it as
SQLITE_CORRUPT: copy the file and recover with.recover.
Related errors
SQLITE_CORRUPTdatabase disk image is malformedSQLITE_ERROR_MISSING_COLLSEQno such collation sequence
More extended result codes errors
SQLITE_BUSY_RECOVERYanother process is recovering the WALSQLITE_LOCKED_SHAREDCACHErecord locked in shared cacheSQLITE_CONSTRAINT_CHECKCHECK constraint failedSQLITE_ABORT_ROLLBACKstatement aborted by ROLLBACKSQLITE_BUSY_SNAPSHOTstale read can't become a writeSQLITE_IOERR_SHORT_READread returned fewer bytesSQLITE_CANTOPEN_ISDIRthe path is a directorySQLITE_BUSY_TIMEOUTblocking file lock timed out
The code and message text are from the SQLite result and error codes documentation. Browse the full SQLite error list or search every database error.
Work on SQLite in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQLite and the other databases you use.