[EMAIL PROTECTED] wrote:
Eric Scouten <[EMAIL PROTECTED]> wrote:
The question really boils down to "can SQLite offer enough information
to help me diagnose the problem it's telling me I have?"
Or to put it another way, this is essentially a memory leak problem.
SQLite obviously knows that I've lost track of one or more prepared
statements that haven't run to completion, it isn't telling me *what*
statements those are. I'm wondering if there is any way of getting that
information. Armed with that knowledge, I can probably fix my code
fairly quickly.
If you have a symbolic debugger and you compile with -g, then you
can look inside the internal SQLite data structures and figure this
out. Each "sqlite*" connection object contains a linked list of
pending statements. Just follow the list. If you compile with
-DSQLITE_DEBUG=1 (I think) then the VDBE code on each statement will
be terminated by a Noop instruction whose P3 argument is the original
text of the SQL statement. You can use that to figure out which
statement is which.
I'm afraid there is no easier way.
Richard, thanks. I just filed a low-priority feature request (ticket
#1558) to make this process easier for the next person who encounters
this problem.
In the meantime, this should be enough info to help me find my bug.
Thanks for the tip!
-Eric
--
Eric Scouten | [EMAIL PROTECTED] | Photography: www.ericscouten.com