Bug #29409 Bug on Open Connection with pooling=true to a MYSQL Server that is shutdown
Submitted: 28 Jun 2007 4:28 Modified: 7 Aug 2007 7:22
Reporter: Jack Chan Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:MySQL Connector Net 5.0.7 OS:Windows (XP with Visual Studio 2005)
Assigned to: CPU Architecture:Any

[28 Jun 2007 4:28] Jack Chan
Description:
Hi 

   I am using VB.NET 2005 and MySQL Connector Net 5.0.7. I get a time out problem to connect to a mysql server which is down for optimize. 

I get the time out error after try for 6 times(Max Pool Size=6). Then i start up Mysql server, becuase the maxium pool size is reached,I still get the time out error even the mysql server is up. i will need to shutdown my application and restart it again.

Here is my code in VB.net to generate the error

How to repeat:

Dim ConString As String = "server=localhost;uid=uuuu;pwd=pppp;database=ddddd;port=3306;pooling=true;Max Pool Size=6;connect timeout=3" 

Dim DBcon As MySql.Data.MySqlClient.MySqlConnection

Dim Errcount As Integer = 0

Do

Try

DBcon = New MySql.Data.MySqlClient.MySqlConnection(ConString)

DBcon.Open()

DBcon.Close()

Catch ex As Exception

Errcount += 1

Debug.WriteLine(Now & " : " & Errcount & " - " & DBcon.State.ToString & " - " & ex.Message)

DBcon.Close()

End Try

Loop
[24 Jul 2007 0:02] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/31445
[24 Jul 2007 0:06] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/31448
[24 Jul 2007 0:08] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/31449
[24 Jul 2007 0:13] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/31452
[24 Jul 2007 0:14] Reggie Burnett
Fixed in 1.0.10, 5.0.8, and 5.1.3
[7 Aug 2007 7:22] MC Brown
A note has been added to the 1.0.10, 5.0.8 and 5.1.3 changelogs: 

The availability of a MySQL server would not be reset when using pooled connections (pooling=true). This would lead to the server being reported as unavailable, even if the server become available while the application was still running.