sorry, I don't know if it is allowed to end a transaction from a different connection than the one that obtained the lock. I would not recommend that, sounds a bit unhealthy from the application point of view. I'm pretty sure that a transaction is partly connection related since sqlite will still allow to do inserts/selects on this connection meanwhile other connections are locked. so, doing a COMMIT from a different connection might fail, I guess. ehm.. this commit from the other connection was successful?
Marcus >> I'm wondering on which statement your first thread returns busy as >> well. both are waiting to get a transaction acquired? Or is the first >> thread waiting for the commit? > > Both are waiting to start a transaction. > >> Maybe you can post some code or a little extraction of what you are >> doing? When I started with sqlite and threads I can recall some >> similar problems but all of them where related to my programming >> (bugs) and by posting parts of my implementation here usually enables >> the sqlite friends to help. > > Yes, after digging through the code some more today, I believe that > there's a possibility that one thread starts a transaction and another > thread tries to end a transaction on a different database handle (but > same database file). I will try to clean that up, as that's probably the > most likely cause of this problem (and it doesn't feel healthy to do > that anyway). If that doesn't help me, I'll try to come up with some > sensible code segments replicating the problem, as the production code > is way too large to make sense of :) > > But just to clear things - I cannot start a transaction on the database > file in one connection and end that transaction in another connection, > can I? > > Thanks, > > Dennis > > P.S. It seems I sent another reply directly to you - sorry about that :) > > _______________________________________________ > 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