You should also check, as R.Smith and Slavin pointed, that you don't 
accidentally have a BEGIN [DEFERRED] somewhere, as that would trigger 
exactly this behavior: it will lock on the first select (the first 
step() actually)

On 13.03.2015 02:44, Simon Slavin wrote:
> On 13 Mar 2015, at 12:17am, Barry <smith.barryp at gmail.com> wrote:
>
>> On 13 March 2015 at 01:21, Dinu Marina <dinumarina at gmail.com> wrote:
>>
>>> You should be also aware of a more common pitfall: unclosed result sets.
>>> Any lock is held until you read PAST the last row or you call stmt_finalize
>>> (or the equivalent abstraction in your DBAL). Always close select
>>> statements.
>> Hi Dinu,
>>
>> Am I correct in my understanding then that it is not enough to call
>> sqlite3_reset, I must call sqlite3_finalize after I am done with a
>> statement?
> In order to dispose of a statement you can do either sqlite3_reset() or 
> sqlite3_finalize().  The common mistake is to do something like this:
>
> SELECT * FROM myTable WHERE rowid = 36
>
> and then not do either _reset() or _finalize() because you know you have 
> asked for only one row so you expect SQLite to have done a _finalize() for 
> you.
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to