In http://ideone.com/7lhIh is my example code.
I would like to know if this would be an appropiate implemetation/use of
BEGIN IMMEDIATE
and sqlite3_busy_timeout.
As I understood from the documentation and literature about Transaction
and locks
the sqlite3_step is the action state part so I enclosed sqlite3_step
with BEGIN IMMEDIATE and COMMIT, but then occurred errors from the
sqlite3_prepare_v2
Thats why i enclosed now all db-concerning steps with BEGIN IMMEDIATE
and COMMIT.
With this construction appear still some database lock errors but lesser
then with a
sqlite3_busy_timeout(db, 23) e.g.
As I understood, the BEGIN IMMEDIATE would try to get the RESERVED lock
once, and if it fails it gets a SQLITE_BUSY.
The BEGIN IMMEDIATE will however try to get the RESERVED lock many times
, if a sqlite3_busy_timeout is defined, but all tries happen within the
time defined by the sqlite3_busy_timeout. Or is it like this, that
BEGIN IMMEDIATE tries it again exactly once again after the timeout ?
In literature it is also mentioned that the BEGIN IMMEDIATE has to be
resetted.
How and where do I have to do this in my example code ?
I would appreciate some suggestions
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users