Modified:
branches/5.1/Driver/Source/MySqlPool.cs
Log:
Fixed a problem where we were not adding a new driver created to the in use pool. This bug was introduced with the last patch
Modified: branches/5.1/Driver/Source/MySqlPool.cs
===================================================================
--- branches/5.1/Driver/Source/MySqlPool.cs 2008-05-28 15:15:19 UTC (rev 1305)
+++ branches/5.1/Driver/Source/MySqlPool.cs 2008-05-30 18:25:32 UTC (rev 1306)
@@ -107,7 +107,7 @@
/// <returns>An idle driver object</returns>
private Driver CheckoutConnection()
{
- Driver driver = (Driver)idlePool.Dequeue();
+ Driver driver = (Driver)idlePool.Dequeue();
// first check to see that the server is still alive
if (!driver.Ping())
@@ -121,8 +121,6 @@
if (settings.ConnectionReset)
driver.Reset();
- inUsePool.Add(driver);
-
return driver;
}
@@ -139,6 +137,7 @@
driver = CreateNewPooledConnection();
else
driver = CheckoutConnection();
+ inUsePool.Add(driver);
Debug.Assert(driver != null);
return driver;
}
@@ -208,7 +207,7 @@
try
{
Driver d = GetPooledConnection();
- return d;
+ return d;
}
catch (Exception ex)
{
| Thread |
|---|
| • Connector/NET commit: r1306 - branches/5.1/Driver/Source | rburnett | 30 May |