SQLITE_ABORT_ROLLBACK: statement aborted by ROLLBACK
A statement failed because the transaction it was running in was rolled back while it was still pending, for example by a ROLLBACK on the same connection.
- Result code
SQLITE_ABORT_ROLLBACK- Name
516- Category
- Extended result codes
What it means
SQLITE_ABORT_ROLLBACK (516) means a statement was aborted because the transaction that was active when it started was rolled back. Pending writes always fail this way after a rollback; a pending read fails only if the schema changed inside the transaction being rolled back. The text is abort due to ROLLBACK.
Common causes
- Calling
ROLLBACKwhile another statement on the same connection is still being stepped. - An error elsewhere that made the application (or SQLite, for example after an
INTERRUPTorON CONFLICT ROLLBACK) roll back the transaction.
How to fix it
-
Finish or reset all statements on a connection before rolling back its transaction.
-
Look for the earlier error that triggered the rollback and fix that; this error is a consequence.
Related errors
SQLITE_ABORTquery abortedSQLITE_LOCKEDdatabase table is lockedSQLITE_INTERRUPTinterrupted25P02PostgreSQL: current transaction is aborted
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_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.