Re: [sqlite] SQLITE_STMT extension
Ah, OK. I will just keep track then of statement handles in my own code, which is quite simple. RBS On Sat, Aug 5, 2017 at 2:54 PM, Richard Hippwrote: > On 8/5/17, Bart Smissaert wrote: > > > > SQLite_stmt doesn't hold the statement handle... > > I wonder why this is. > > > > Because that would be a "pointer leak". https://sqlite.org/bindptr. > html#ptrleak > > -- > D. Richard Hipp > d...@sqlite.org > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLITE_STMT extension
On 8/5/17, Bart Smissaertwrote: > > SQLite_stmt doesn't hold the statement handle... > I wonder why this is. > Because that would be a "pointer leak". https://sqlite.org/bindptr.html#ptrleak -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLITE_STMT extension
As I understand this the eponymous-only virtual table, sqlite_stmt, will show any active (so not finalized) statements on the current database connection. As mentioned this can be useful to track unfinalized statements and this is what I was interested in. There are 2 problems with this: Firstly a minor one: When I run SELECT * FROM sqlite_stmt I will at least get a result like this: *sql* *ncol* *ro* *busy* *nscan* *nsort* *naidx* *nstep* *reprep* *run* *mem* SELECT * FROM sqlite_stmt 11 1 1 0 0 0 19 0 1 62392 As this statement has not been finalized yet. Not really a problem as I can ignore this as I can see that this is the only row and is from running a statement on SQLite_stmt. The main problem is however that SQLite_stmt doesn't hold the statement handle, so the result of sqlite3_prepare. I wonder why this is. RBS ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users