apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: Column names with apr_dbd
Date Thu, 23 Feb 2006 18:23:53 GMT
On Wed, 2006-02-22 at 05:51 +0000, Nick Kew wrote:

> If a pool is needed, it should be simple enough to make it a member of the
> apr_dbd_results_t struct.  But since get_row at the same level of the API
> has a pool argument, I agree your proposal looks like the best solution.

Actually, when I think about it now, my idea of passing the pool to
get_name seems really bogus. What should happen instead for SQLite3 is
apr_pstrdup of column names inside dbd_sqlite3_select (i.e. at present,
this part of the code in the driver is buggy, but since it doesn't get
used, nobody noticed yet). If sqlite3_finalize does what I think it does
(frees memory), then it is just by pure luck that I'm able to keep
values of column names by copying them to the pool in get_name (i.e.
that memory has been freed long ago).

Ah well, I think there will have to be take 3 on this :-(

--
Bojan


Mime
View raw message