>> > So is such behavior documented and can be used or should I still avoid
>> > keeping such "live" statements in db-shared enviroment?
>>
>> It's documented that sqlite3_finalize AND sqlite3_reset release all
>> locks acquired by the statement. So after resetting the statement you
>> can keep it as long as you want, it won't block out any other process
>> from accessing the database.
>>
>>
> Thanks, Pavel, but could not find this in the docs, only found this topic
> was discussed previously when drh answered:
>
>> You should be in the habit of calling sqlite3_reset() on each query
>> as soon as that query finishes.  Otherwise the query *might* leave a
>> read-lock on the database file and thus prevent subsequent write
>> operations for working correctly.
>
> Just hope this information will be included in the article about
> sqlite3_reset some day,

Some good timing here with this info.
Ive just changed all my code to reset after query, instead of reset
before bind & query.

This info should definitely be mentioned in the reset doc's.

Thanks!
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to