Bug #13459 Connection Pooling Bug

Submitted: 24 Sep 2005 13:41 Modified: 6 Nov 2007 15:38
Reporter: Carsten Jendro Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S4 (Feature request)
Version:1.0.5 OS:Windows (windows & linux)
Assigned to: CPU Architecture:Any

[24 Sep 2005 13:41] Carsten Jendro
Description:
An Exception Occures on 

MySqlConnection c = new MySqlConnection("......");
c.Open()

when 

- Pooling is ON
- There is a Connection in the Pool
- The TCP Connection to the MySql Server ist Terminated Serverside (e.g. Network down or Server closed Connection after 28800 Seconds) 

Driver Tryes to read or write from the closed Connection then 

How to repeat:
MySqlConnection c = new MySqlConnection("......");
c.Open()
c.Close()

/* connection is in the pool now and still open */

terminate tcp connection or shutdown server

c = new MySqlConnection("......");
c.Open()

Suggested fix:
when a pool connection is used, you should check it first (ping) and create a new connection if this dont works.

never pass pool exceptions to the application
[6 Nov 2007 15:38] Reggie Burnett
This is an old bug report and this is no longer a problem

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.