From: Date: October 25 2007 9:40pm Subject: Connector/NET commit: r1047 - in branches/5.1: . Driver/Source/common TestSuite/Source List-Archive: http://lists.mysql.com/commits/36374 X-Bug: 31433 Message-Id: <200710251940.l9PJenSK029563@bk-internal.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified: branches/5.1/CHANGES branches/5.1/Driver/Source/common/Cache.cs branches/5.1/TestSuite/Source/ConnectionTests.cs Log: Fixed problem with connection string caching where our collection class was using case insensitive semantics and this causes cases where a user orginally used the wrong case for a user id and then fixed it to still get access denied errors. (Bug #31433) Modified: branches/5.1/CHANGES =================================================================== --- branches/5.1/CHANGES 2007-10-25 19:38:09 UTC (rev 1046) +++ branches/5.1/CHANGES 2007-10-25 19:40:48 UTC (rev 1047) @@ -90,7 +90,11 @@ (Bug #31090) - Fixed problem that prevented commands from being executed from the state change handler. Not sure why you would want to do this but... (bug #30964) - + - Fixed problem with connection string caching where our collection class was + using case insensitive semantics and this causes cases where a user orginally + used the wrong case for a user id and then fixed it to still get access denied + errors. (Bug #31433) + Version 5.0.8 8/16/2007 Bug #28706 Log messages are truncated - Fixed a problem with compression over a network. We were letting the inflate stream read Modified: branches/5.1/Driver/Source/common/Cache.cs =================================================================== --- branches/5.1/Driver/Source/common/Cache.cs 2007-10-25 19:38:09 UTC (rev 1046) +++ branches/5.1/Driver/Source/common/Cache.cs 2007-10-25 19:40:48 UTC (rev 1047) @@ -19,6 +19,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA using System.Collections.Specialized; +using System; namespace MySql.Data.Common { @@ -26,7 +27,8 @@ { private int capacity; - public Cache(int initialCapacity, int capacity) : base(initialCapacity) + public Cache(int initialCapacity, int capacity) : + base(initialCapacity, StringComparer.CurrentCulture) { this.capacity = capacity; } Modified: branches/5.1/TestSuite/Source/ConnectionTests.cs =================================================================== --- branches/5.1/TestSuite/Source/ConnectionTests.cs 2007-10-25 19:38:09 UTC (rev 1046) +++ branches/5.1/TestSuite/Source/ConnectionTests.cs 2007-10-25 19:40:48 UTC (rev 1047) @@ -446,5 +446,32 @@ { } } + + /// + /// Bug #31433 Username incorrectly cached for logon where case sensitive + /// + [Test] + public void CaseSensitiveUserId() + { + string connStr = GetConnectionStringEx("Test", "test", true); + MySqlConnection c = new MySqlConnection(connStr); + try + { + c.Open(); + } + catch (MySqlException) + { + } + connStr = GetConnectionStringEx("test", "test", true); + c = new MySqlConnection(connStr); + try + { + c.Open(); + } + catch (MySqlException ex) + { + Assert.Fail(ex.Message); + } + } } }