List:Commits« Previous MessageNext Message »
From:rburnett Date:August 19 2008 3:46pm
Subject:Connector/NET commit: r1385 - in trunk: . MySql.Data/Provider/Source MySql.Data/Tests/Source
View as plain text  
Modified:
   trunk/CHANGES
   trunk/MySql.Data/Provider/Source/datareader.cs
   trunk/MySql.Data/Tests/Source/DataReaderTests.cs
Log:
- Fixed lingering problem related to bug #37239.  If two columns had the same name but
  different case then an exception would be thrown.


Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES	2008-08-18 21:46:28 UTC (rev 1384)
+++ trunk/CHANGES	2008-08-19 15:46:15 UTC (rev 1385)
@@ -3,6 +3,8 @@
 - Improved sql tokenizing speed greatly.  Patch submitted by Maxim Mass (bug #36836)
 - Fixed possible overflow bug in MySqlPacket.ReadLong (bug #36997)
 - Added UDF schema collection
+- Fixed lingering problem related to bug #37239.  If two columns had the same name but
+  different case then an exception would be thrown.
 
 Version 5.2.3 - 8/14/08
 - Increased the speed of MySqlDataReader.GetOrdinal dramatically by using a couple

Modified: trunk/MySql.Data/Provider/Source/datareader.cs
===================================================================
--- trunk/MySql.Data/Provider/Source/datareader.cs	2008-08-18 21:46:28 UTC (rev 1384)
+++ trunk/MySql.Data/Provider/Source/datareader.cs	2008-08-19 15:46:15 UTC (rev 1385)
@@ -860,10 +860,9 @@
 				{
                     string columnName = fields[i].ColumnName;
                     if (!fieldHashCS.ContainsKey(columnName))
-                    {
                         fieldHashCS.Add(columnName, i);
+                    if (!fieldHashCI.ContainsKey(columnName))
                         fieldHashCI.Add(columnName, i);
-                    }
 					values[i] = fields[i].GetValueObject();
 				}
 				hasRead = false;

Modified: trunk/MySql.Data/Tests/Source/DataReaderTests.cs
===================================================================
--- trunk/MySql.Data/Tests/Source/DataReaderTests.cs	2008-08-18 21:46:28 UTC (rev 1384)
+++ trunk/MySql.Data/Tests/Source/DataReaderTests.cs	2008-08-19 15:46:15 UTC (rev 1385)
@@ -721,6 +721,14 @@
                 Assert.AreEqual(name1, name2);
                 Assert.AreEqual(name1, "test");
             }
+
+            cmd.CommandText = "SELECT 'a' AS XYZ, 'b' as Xyz";
+            using (MySqlDataReader reader = cmd.ExecuteReader())
+            {
+                reader.Read();
+                string name1 = reader.GetString(0);
+                string name2 = reader.GetString(1);
+            }
         }
     }
 }

Thread
Connector/NET commit: r1385 - in trunk: . MySql.Data/Provider/Source MySql.Data/Tests/Sourcerburnett19 Aug