> SQLITE_LOCKED implies that the contention is on the > same connection
Where did you get this from? Nothing can prevent execution of several statements on the same connection. AFAIK, SQLITE_LOCKED implies that contention is from another connection using the same shared database cache. And it can be handled either via a busy handler just like SQLITE_BUSY or via sqlite3_unlock_notify(). Pavel On Wed, May 23, 2012 at 12:39 PM, Shaun Seckman (Firaxis) <shaun.seck...@firaxis.com> wrote: > The two errors SQLITE_BUSY and SQLITE_LOCKED are very similar but also > very different. SQLITE_LOCKED implies that the contention is on the > same connection whereas SQLITE_BUSY implies that the contention is from > another connection and can be handled via a busy handler. > > > > The error message reported from sqlite3_errmsg is very deceiving > though... > > > > SQLITE_BUSY -> "database is locked." > > SQLITE_LOCKED -> "database table is locked." > > > > For days now, I kept receiving a "database is locked." error in my logs > thinking the contention was due to a single connection only to just now > realize the error code was indeed SQLITE_BUSY. > > > > Can we instead change the error message to read: > > SQLITE_BUSY -> "database is busy." > > SQLITE_LOCKED -> "database table is locked" > > > > -Shaun > > > > > > Shaun Seckman > > Firaxis Games > Programmer > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users