Modified:
branches/5.2/CHANGES
branches/5.2/MySql.Data/Provider/Source/Connection.cs
branches/5.2/MySql.Data/Tests/Source/ConnectionTests.cs
Log:
merged
Modified: branches/5.2/CHANGES
===================================================================
--- branches/5.2/CHANGES 2008-05-07 15:45:22 UTC (rev 1286)
+++ branches/5.2/CHANGES 2008-05-07 15:48:48 UTC (rev 1287)
@@ -76,7 +76,9 @@
- Fixed data type processing so that geometry fields are returned as binary. (bug
#36081)
- Fixed problem that kept our provider from showing up in the provider list when
configuring
a new connection from a SqlDataSource
-
+ - Fixed problem where setting the ConnectionString property of MySqlConnection to null
+ would throw an exception (bug #35619)
+
Version 5.1.5 - 2/11/2008
- Fixed problem with membership provider where FindUserByEmail would fail trying to add
a second parameter with the same name as the first (bug #33347)
Modified: branches/5.2/MySql.Data/Provider/Source/Connection.cs
===================================================================
--- branches/5.2/MySql.Data/Provider/Source/Connection.cs 2008-05-07 15:45:22 UTC (rev
1286)
+++ branches/5.2/MySql.Data/Provider/Source/Connection.cs 2008-05-07 15:48:48 UTC (rev
1287)
@@ -251,11 +251,16 @@
MySqlConnectionStringBuilder newSettings;
lock (connectionStringCache)
{
- newSettings =
(MySqlConnectionStringBuilder)connectionStringCache[value];
- if (null == newSettings)
+ if (value == null)
+ newSettings = new MySqlConnectionStringBuilder();
+ else
{
- newSettings = new MySqlConnectionStringBuilder(value);
- connectionStringCache.Add(value, newSettings);
+ newSettings =
(MySqlConnectionStringBuilder)connectionStringCache[value];
+ if (null == newSettings)
+ {
+ newSettings = new MySqlConnectionStringBuilder(value);
+ connectionStringCache.Add(value, newSettings);
+ }
}
}
Modified: branches/5.2/MySql.Data/Tests/Source/ConnectionTests.cs
===================================================================
--- branches/5.2/MySql.Data/Tests/Source/ConnectionTests.cs 2008-05-07 15:45:22 UTC (rev
1286)
+++ branches/5.2/MySql.Data/Tests/Source/ConnectionTests.cs 2008-05-07 15:48:48 UTC (rev
1287)
@@ -473,5 +473,15 @@
Assert.Fail(ex.Message);
}
}
+
+ /// <summary>
+ /// Bug #35619 creating a MySql connection from toolbox generates an error
+ /// </summary>
+ [Test]
+ public void NullConnectionString()
+ {
+ MySqlConnection c = new MySqlConnection();
+ c.ConnectionString = null;
+ }
}
}
| Thread |
|---|
| • Connector/NET commit: r1287 - in branches/5.2: . MySql.Data/Provider/Source MySql.Data/Tests/Source | rburnett | 7 May |