List:Commits« Previous MessageNext Message »
From:Reggie Burnett Date:February 14 2011 9:01pm
Subject:bzr commit into connector-net-6.1 branch (reggie.burnett:873)
View as plain text  
#At file:///C:/Users/Reggie/work/connector-net/6.1/ based on revid:reggie.burnett@stripped

  873 Reggie Burnett	2011-02-14 [merge]
      merged

    modified:
      CHANGES
      MySql.Data/Provider/Source/MySqlConnectionStringBuilder.cs
      MySql.Data/Tests/Source/ConnectionStringBuilder.cs
=== modified file 'CHANGES'
=== modified file 'CHANGES'
--- a/CHANGES	2011-02-14 19:20:58 +0000
+++ b/CHANGES	2011-02-14 21:01:11 +0000
@@ -25,6 +25,8 @@
   (MySQL bug #59537, Oracle bug #11766433)
 - fixed bug that prevented setting the membershipprovider's ApplicationName property at runtime
   (MySQL bug #59438, Oracle bug #11770465)
+- fixed MySqlConnectionStringBuilder.ContainsKey to return true for any alternative versions
+  of a keyword (MySQL bug #59835, Oracle bug #11766671)
 
 Version 6.1.5
 - Fix authorization popup after modifying stored procedure in VS (Bug #44715)

=== modified file 'MySql.Data/Provider/Source/MySqlConnectionStringBuilder.cs'
--- a/MySql.Data/Provider/Source/MySqlConnectionStringBuilder.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data/Provider/Source/MySqlConnectionStringBuilder.cs	2011-02-14 21:01:11 +0000
@@ -1109,6 +1109,12 @@
             return connStr.Remove(connStr.Length - 1, 1);
         }
 
+        public override bool ContainsKey(string keyword)
+        {
+            Keyword kw = GetKey(keyword);
+            return GetValue(kw) != null;
+        }
+
         /// <summary>
         /// Clears the contents of the <see cref="MySqlConnectionStringBuilder"/> instance. 
         /// </summary>

=== modified file 'MySql.Data/Tests/Source/ConnectionStringBuilder.cs'
--- a/MySql.Data/Tests/Source/ConnectionStringBuilder.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data/Tests/Source/ConnectionStringBuilder.cs	2011-02-14 21:01:11 +0000
@@ -98,5 +98,19 @@
             s["database"] = "test2";
             Assert.AreEqual("database=test2", s.ConnectionString);
         }
+
+        /// <summary>
+        /// Bug #59835	.Net Connector MySqlConnectionStringBuilder wrong result ContainsKey function
+        /// </summary>
+        [Test]
+        public void ContainsKey()
+        {
+            MySqlConnectionStringBuilder s = new MySqlConnectionStringBuilder();
+            s["database"] = "test";
+            Assert.IsTrue(s.ContainsKey("initial catalog"));
+            s["server"] = "myserver";
+            Assert.IsTrue(s.ContainsKey("server"));
+            Assert.IsTrue(s.ContainsKey("host"));
+        }
     }
 }

No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).
Thread
bzr commit into connector-net-6.1 branch (reggie.burnett:873) Reggie Burnett14 Feb