SQLITE_LOCKED_VTAB
SQLiteWARNINGNotableLockingofficial confidence
Virtual table is locked
Production Risk
Low — SQLite handles retries internally in most scenarios.
What this means
SQLITE_LOCKED_VTAB (518) is returned by a virtual table's xBegin or xSync method to signal that the virtual table is locked and the transaction cannot proceed. This allows SQLite to retry after releasing other locks.
Why it happens
- 1Virtual table implementation returned SQLITE_LOCKED_VTAB to indicate it is temporarily busy.
- 2Concurrent access to the virtual table's backing store.
How to reproduce
Two-phase commit on a virtual table when the vtab's backing store is locked.
trigger — this will error
trigger — this will error
-- Virtual table operations that trigger internal locking -- SQLITE_LOCKED_VTAB causes SQLite to retry the two-phase commit
expected output
Transient; SQLite retries automatically in most cases.
Fix 1
Fix 2
Sources
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev