Re: [PHP-DEV] I think I found the ODBC/Solid failures From: Andreas Karajannis (Andreas.Karajannis <email protected>)
Date: 01/21/99

> Aha. Even if it is a problem in the Solid libs, it would be nice if we
> could somehow prevent the core dump by adding a bit of error checking to
> PHP. I am not familiar with the Solid API, but might there not be some
> way to prevent trying to free the result when the returned result is
> empty? Sounds like it might be a quick and easy check in
> odbc_free_result().
>
> -Rasmus

The result set may be empty (e.g. a select returned no rows),
but still you executed some SQL statement.
The function in question (SQLTransact()) was only
introduced to be called on freeing a result since Solid
considers all statements (including selects) as transactions.
So if you don't commit your select before freeing a result,
you will get locking errors on the following statements.
This was especially weird with pconnections.
I would consider SQLTransact() coredumping when there is
no transaction pending as a library bug ;-)
Nevertheless, I'll have a lock what could be done here.

-Andreas

-- 
Andreas Karajannis
GMD National Research Center for Information Technology
Schloss Birlinghoven, D-53754 Sankt Augustin
Phone +49 2241 142948

-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>