SQLITE_IOERR_SHORT_READ: read returned fewer bytes
A read in SQLite's VFS layer got fewer bytes than it asked for, which usually means the database file is truncated.
- Result code
SQLITE_IOERR_SHORT_READ- Name
522- Category
- Extended result codes
What it means
SQLITE_IOERR_SHORT_READ (522) is an extended SQLITE_IOERR code: a read couldn't get as many bytes as requested. The SQLite documentation names a truncated file as a likely cause, for example from an incomplete copy or download.
Common causes
- The file was truncated by an interrupted copy, download or sync.
- Another process truncated or replaced the file while it was open.
How to fix it
-
Compare the file's size with the original or with a backup, and re-copy it.
-
Check what can still be read, and recover into a new file if needed.
PRAGMA integrity_check;
Related errors
More extended result codes errors
SQLITE_ERROR_MISSING_COLLSEQno such collation sequenceSQLITE_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_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.