On Fri, Jan 20, 2017 at 1:08 PM, Rasmus Lerdorf <ras...@lerdorf.com> wrote:

>
> On Fri, Jan 20, 2017 at 12:58 Nikita Popov <nikita....@gmail.com> wrote:
>
>>
>> That sounds like it could be the source of the issue.
>>
> Ah, that makes more sense than it never hitting that close call because I
> couldn't find any scenario where we wouldn't get there eventually. So it
> sounds like we should be calling sqlite3_close_v2() there instead.
>

Of course, something must be causing the unfinalized prepared statement in
the first place so moving to the v2 close likely wouldn't fix it, just move
it from an unclosed db handle to an unclosed "unusable zombie" handle,
whatever that means. I also noticed that ext/sqlite3 uses
sqlite3_prepare_v2() while pdo_sqlite uses sqlite3_prepare(). The
differences in those two don't seem like they would affect whether the
prepare is finalized or not though. There still must be some path where on
a timeout we don't call pdo_sqlite_stmt_dtor() which does the finalize on
the statement.

-Rasmus

Reply via email to