On 12 Jun 2011, at 3:05pm, Ian Hardingham wrote: > If process B tries to access a table which process A is currently > writing to, is an error returned or does sqlite block? I very much need > SQLite to block - is there an option for that?
[context: Ian is explicitly using BEGIN EXCLUSIVE for his transactions] Hahaha. Now you have to read and understand <http://www.sqlite.org/c3ref/busy_handler.html> See you in two years. I'm not very familiar with it, but my understanding is that after a short initial time of retrying, your function call will return a result of either SQLITE_BUSY or SQLITE_IOERR_BLOCKED. Here are all the result codes: <http://www.sqlite.org/c3ref/c_abort.html> And here is a very detailed treatment of how locking works, which you should probably read if you are going to depend on exactly how SQLite does locking rather than just rely on it doing The Right Thing: <http://www.sqlite.org/lockingv3.html> Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users