Thanks Jay, but perhaps you could provide some useful links to the reading material you suggest instead of just stating what you think I need to do? For example, http://www.sqlite.org/lockingv3.html provides only minimal information on the lock types in Sqlite3.
At any rate, I do understand what is going on with the deadlocking, and yes I see that a begin immediate is needed for all threads in this case. So I should restate a question I had posed to Igor earlier -- perhaps there could be a pragma which caused all *write-transactions* to be begin-immediate? This would allow 1-line INSERTs (executed without a formal transaction wrapper) to also be begin-immediate. -Dave On 3/14/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: > > On 3/13/06, Dave Brown <[EMAIL PROTECTED]> wrote: > > Yeah if I put BEGIN IMMEDIATE in thread1 as well, then it works, but as > you > > say I don't see why I need to do this. Perhaps the implicit transaction > > which is created in my 1-line INSERT statement isn't an immediate > > transaction?? > > > > Seems like there should be a flag or pragma or something to force all > > transactions to be immediate. > > Dave, you need to go read more about deadlocks (and some about how > locks are created) > to understand this. All of your threads must have the begin immediate or > it > won't solve the problem. Understanding what's going on is the key to > success >