Hi, Simon What means "using _timeout()" properly? The manual says, _timeout() can still make _step() returns SQLITE_BUSY or SQLITE_IOERR_BLOCKED if the user provided timeout value eventually accumulated. For example, if I set _timeout() to 3000ms, but after that time, the table I was trying to update still locked by another process. This is normal, right?
On 7 January 2014 19:32, Simon Slavin <slav...@bigfraud.org> wrote: > > On 7 Jan 2014, at 10:13am, Woody Wu <narkewo...@gmail.com> wrote: > > > Thanks for the clear guide. _busy_timeout is easier to use. By the > way, i > > want confirm that if i am not in an explicit transaction, i can simply > redo > > the _step() invoking, right? > > However, if you are using _timeout() properly, you should never need to > recover to an understood situation after a SQLITE_BUSY, since a _BUSY > result will always indicate an unrecoverable error. Therefore you will > never need to figure out whether you should be doing a ROLLBACK. Just > _finalize() the operation (then probably _close() and quit the program) and > it either worked or it didn't. > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer narke public key at http://subkeys.pgp.net:11371 (narkewo...@gmail.com) _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users