#32191 [Opn->Fbk]: Persistant Connection do not get revalidated on re-use and fail to reconnect
| From: | sniper@php.net | Date: | Fri, 04 Mar 2005 15:21:56 +0000 |
| Subject: | #32191 [Opn->Fbk]: Persistant Connection do not get revalidated on re-use and fail to reconnect | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74836@lists.php.net to get a copy of this message | ||
ID: 32191
Updated by: sniper@php.net
Reported By: carstenklein at yahoo dot de
-Status: Open
+Status: Feedback
Bug Type: MySQL related
Operating System: Any
PHP Version: Irrelevant
New Comment:
There is not 'Irrelevant' PHP version or operating system called 'Any'.
Please fill those fields in this report properly.
Previous Comments:
------------------------------------------------------------------------
[2005-03-04 12:57:52] carstenklein at yahoo dot de
Description:
------------
I have developed a database access layer that tries to ensure that
proper result handling is provided for.
However, when using persistant connections I have the problem that
whenever the database service fails (due to intermediate shutdown or
other network related problems), the persistantly opened connection
link to the database service does not revalidate its connection and as
such will report a mysql_error() state of naught and as such it cannot
be determined exactly as to where the error stems from.
Reproduce code:
---------------
I will not post any line of source code here, just an indepth
explanation of how to reproduce:
start your mysql daemon.
open a persistant connection to the service.
do something with the connected and selected database.
shutdown the mysql daemon.
try to re-use the persistant connection using mysql_pconnect() and try
to send a query to the service.
The query will fail, but there will not be any result code given by
mysql_errno() that will provide any hint on the actual cause of the
failure.
Expected result:
----------------
My code should produce a DbConnectionFailure instead of simply an
DbUnexpectedFailure or DbUnknownFailure in case the persistant
connection to the database fails because of the database service being
no longer available.
Actual result:
--------------
DbUnknownFailure.
mysql_errno() fails to report error state.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32191&edit=1