On 20 Jan 2019, at 11:54pm, Richard Damon <rich...@damon-family.org> wrote:

> If the issue is the dead lock, you get similar issues with all DBMSes.

I'm not perfectly sure of my logic here, but OP posted elsewhere that replacing 
BEGIN with BEGIN IMMEDIATE cures the problem.  I think this indicates that his 
problem isn't deadlock.

The problem is more about how SQLite implements BEGIN without IMMEDIATE.  As 
others have explained in this thread, SQLite does its best to avoid locking the 
database until it really needs to.  But it does need to obtain a shared lock, 
and this fails in the specific pattern OP uses.

Which is why BEGIN IMMEDIATE exists.  So use BEGIN IMMEDIATE.  Done.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to