> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On > Behalf Of Simon Slavin
> It is not enough to lock the _prepare, lock the _step()s, and lock the > _finalize. > If they're sharing a connection with other threads then the lock has to be > placed at the start of the prepare and be released at the end of the > finalize. > Don't forget that they're all part of the same transaction. Got it, it's the set of the 3 operations that should be serialized. Thanks. The finalize is the end of the implicit transaction, correct? Assuming that it is the finalize for the only statement being executed on that connection. Then if the same thread did another prepare/step/finalize on that same connection it would be in a new implicit transaction. Do I have that right? > This is why you don't generally share a connection between simultaneous > threads. If the threads have different connections and you let SQLite handle > the locking things work properly. Hmm yes, I'm hearing that repeatedly. We will attempt to identify why using a lot of connections is using such a huge amount of memory and maybe we will be able to go that route. Thanks again Alex _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users