MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:rburnett Date:September 2 2008 2:50pm
Subject:Connector/NET commit: r1398 - in branches/5.2: . MySql.Data/Provider/Source MySql.Data/Tests/Source
View as plain text  
Modified:
   branches/5.2/CHANGES
   branches/5.2/MySql.Data/Provider/Source/datareader.cs
   branches/5.2/MySql.Data/Tests/Source/DataReaderTests.cs
Log:
- backported fix for lingering problem related to bug #37239.  If two columns had the same name but
  different case then an exception would be thrown.

Modified: branches/5.2/CHANGES
===================================================================
--- branches/5.2/CHANGES	2008-08-29 20:43:37 UTC (rev 1397)
+++ branches/5.2/CHANGES	2008-09-02 14:50:58 UTC (rev 1398)
@@ -1,8 +1,9 @@
 Version 5.2.4 - 
 - fixed web providers autogenerateschema option where it would fail if no schema is
   present at all (bug #39072)
+- backported fix for 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
   of hashes for lookups

Modified: branches/5.2/MySql.Data/Provider/Source/datareader.cs
===================================================================
--- branches/5.2/MySql.Data/Provider/Source/datareader.cs	2008-08-29 20:43:37 UTC (rev 1397)
+++ branches/5.2/MySql.Data/Provider/Source/datareader.cs	2008-09-02 14:50:58 UTC (rev 1398)
@@ -861,10 +861,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: branches/5.2/MySql.Data/Tests/Source/DataReaderTests.cs
===================================================================
--- branches/5.2/MySql.Data/Tests/Source/DataReaderTests.cs	2008-08-29 20:43:37 UTC (rev 1397)
+++ branches/5.2/MySql.Data/Tests/Source/DataReaderTests.cs	2008-09-02 14:50:58 UTC (rev 1398)
@@ -920,6 +920,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: r1398 - in branches/5.2: . MySql.Data/Provider/Source MySql.Data/Tests/Sourcerburnett2 Sep