Bojan Smojver <[EMAIL PROTECTED]> wrote:
> Basically, mysql_stmt_init() can return NULL here, which means that
> from *its* perspective, there is no more memory available. Do we trust
> foreign APIs then and just let things segfault (i.e. drop the "if
> ((*statement)->stmt)"), or do we attempt to recover?
Well if there's no statement handle to clean up, we shouldn't try to
register a cleanup event for it. The APR pool may have some memory available
that we can still use. As for the return value (CR_OUT_OF_MEMORY), if that's
not supported by APR, maybe it would be good to downgrade it to a more
general error code?
Cheers,
Tyler