"Blasfamous Tshirts" <[email protected]> wrote in message news:[email protected] > 1. If there is a commit already in progress and I start another > begin/commit > block on this connection
>From a different thread, I presume? SQLite uses a simple mutex to serialize all API calls issued on the same connection. > will this begin or commit fail? If so, with > what error? If you have a COMMIT in progress and you issue a BEGIN from a different thread, that other thread would block until COMMIT finishes. The net result is the same as if you issued a COMMIT followed by BEGIN on the same thread. BEGIN should succeed. > 2. If yes to (1) then is there a way to queue the commits so that the > 2nd > does not start until the first one is over? You don't need to do anything special. You won't be able to run a BEGIN, let alone COMMIT, while the previous COMMIT is in progress. > 3. If for some reason, this for loop (mentioned in my original > question) > does not add any statement to be executed, will commit fail with this > error? No, it shouldn't. > In other words, can there any empty commit? Sure. Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

