List:Commits« Previous MessageNext Message »
From:rburnett Date:March 22 2007 8:57pm
Subject:Connector/NET commit: r646 - in branches/5.0: . Driver/Source TestSuite
View as plain text  
Modified:
   branches/5.0/CHANGES
   branches/5.0/Driver/Source/Connection.cs
   branches/5.0/TestSuite/ConnectionTests.cs
Log:
Bug #27269 MySqlConnection.Clone does not mimic SqlConnection.Clone behaviour 

Changed to using the internal GetConnectionString method so we get the password if
'Persist Security Info' is false.


Modified: branches/5.0/CHANGES
===================================================================
--- branches/5.0/CHANGES	2007-03-22 18:15:19 UTC (rev 645)
+++ branches/5.0/CHANGES	2007-03-22 19:57:14 UTC (rev 646)
@@ -1,5 +1,9 @@
 Version 5.0.7
 
+  Bugs fixed
+  ----------
+  Bug #27269 MySqlConnection.Clone does not mimic SqlConnection.Clone behaviour 
+  
   Other changes
   -------------
   Installer now works if XML comments are found in machine.config

Modified: branches/5.0/Driver/Source/Connection.cs
===================================================================
--- branches/5.0/Driver/Source/Connection.cs	2007-03-22 18:15:19 UTC (rev 645)
+++ branches/5.0/Driver/Source/Connection.cs	2007-03-22 19:57:14 UTC (rev 646)
@@ -427,8 +427,7 @@
 		object ICloneable.Clone()
 		{
 			MySqlConnection clone = new MySqlConnection();
-			clone.ConnectionString = this.ConnectionString;
-			//TODO:  how deep should this go?
+			clone.ConnectionString = settings.GetConnectionString(true);
 			return clone;
 		}
 		#endregion

Modified: branches/5.0/TestSuite/ConnectionTests.cs
===================================================================
--- branches/5.0/TestSuite/ConnectionTests.cs	2007-03-22 18:15:19 UTC (rev 645)
+++ branches/5.0/TestSuite/ConnectionTests.cs	2007-03-22 19:57:14 UTC (rev 646)
@@ -265,13 +265,23 @@
 
 		/// <summary>
 		/// Bug #10281 Clone issue with MySqlConnection 
+        /// Bug #27269 MySqlConnection.Clone does not mimic SqlConnection.Clone behaviour

 		/// </summary>
 		[Test]
 		public void TestConnectionClone()
 		{
-			MySqlConnection c = new MySqlConnection();
-			MySqlConnection clone = (MySqlConnection) ((ICloneable)c).Clone();
-			clone.ToString();
+            MySqlConnection c = new MySqlConnection();
+            MySqlConnection clone = (MySqlConnection)((ICloneable)c).Clone();
+            clone.ToString();
+
+            string connStr = GetConnectionString(true);
+            connStr = connStr.Replace("persist security info=true", "persist security
info=false");
+            c = new MySqlConnection(connStr);
+            c.Open();
+            c.Close();
+            MySqlConnection c2 = (MySqlConnection)((ICloneable)c).Clone();
+            c2.Open();
+            c2.Close();
 		}
 
 		/// <summary>

Thread
Connector/NET commit: r646 - in branches/5.0: . Driver/Source TestSuiterburnett22 Mar