Modified:
trunk/mysqlclient/Connection.cs
trunk/mysqlclient/MySqlPoolManager.cs
Log:
Connection.cs - a few cleanups
MySqlPoolManager - implemented a suggested fix from a user. The user suggested instantiating the hashtable in place. This was done a slightly different way by making the class a static class, adding a static ctor, and instantiating the hashtable there.
Modified: trunk/mysqlclient/Connection.cs
===================================================================
--- trunk/mysqlclient/Connection.cs 2006-10-23 19:18:40 UTC (rev 430)
+++ trunk/mysqlclient/Connection.cs 2006-10-23 19:29:44 UTC (rev 431)
@@ -7,7 +7,7 @@
// There are special exceptions to the terms and conditions of the GPL
// as it is applied to this software. View the full text of the
// exception in file EXCEPTIONS in the directory of this software
-// distribution.
+// distribution.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -367,7 +367,7 @@
}
// if the user is using old syntax, let them know
- if ( driver.Settings.UseOldSyntax)
+ if (driver.Settings.UseOldSyntax)
Logger.LogWarning("You are using old syntax that will be removed in future versions");
SetState(ConnectionState.Open);
Modified: trunk/mysqlclient/MySqlPoolManager.cs
===================================================================
--- trunk/mysqlclient/MySqlPoolManager.cs 2006-10-23 19:18:40 UTC (rev 430)
+++ trunk/mysqlclient/MySqlPoolManager.cs 2006-10-23 19:29:44 UTC (rev 431)
@@ -27,28 +27,17 @@
/// <summary>
/// Summary description for MySqlPoolManager.
/// </summary>
- internal sealed class MySqlPoolManager
+ internal static class MySqlPoolManager
{
private static Hashtable pools;
- public MySqlPoolManager()
+ static MySqlPoolManager()
{
- }
-
- /// <summary>
- ///
- /// </summary>
- private static void Initialize()
- {
pools = new Hashtable();
}
public static MySqlPool GetPool(MySqlConnectionStringBuilder settings)
{
- // make sure the manager is initialized
- if (MySqlPoolManager.pools == null)
- MySqlPoolManager.Initialize();
-
string text = settings.GetConnectionString(true);
lock(pools.SyncRoot)
| Thread |
|---|
| • Connector/NET commit: r431 - trunk/mysqlclient | rburnett | 23 Oct |