From: Date: August 10 2007 11:31pm Subject: Connector/NET commit: r862 - in branches/5.1: . Driver/Source List-Archive: http://lists.mysql.com/commits/32403 X-Bug: 29476 Message-Id: <200708102131.l7ALV2wF016895@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/Field.cs Log: Fixed problem where connecting to pre-4.1 servers would result in a crash. This was caused by the Field object referring to metadata columns that are not populated on pre-4.1 servers. (bug #29476) Modified: branches/5.1/CHANGES =================================================================== --- branches/5.1/CHANGES 2007-08-10 19:47:47 UTC (rev 861) +++ branches/5.1/CHANGES 2007-08-10 21:31:02 UTC (rev 862) @@ -26,6 +26,9 @@ with the new binary respect behavior of 5.1 - Added code to implement better TransactionScope support. This code is brand new and will be heavily refactored in 5.2. (bug #28709) + - Fixed problem where connecting to pre-4.1 servers would result in a crash. This was caused + by the Field object referring to metadata columns that are not populated on pre-4.1 servers. + (bug #29476) Version 5.1.2 - 6/12/2007 - Fixed integration with the Website Administration Tool. Before this fix, the test link Modified: branches/5.1/Driver/Source/Field.cs =================================================================== --- branches/5.1/Driver/Source/Field.cs 2007-08-10 19:47:47 UTC (rev 861) +++ branches/5.1/Driver/Source/Field.cs 2007-08-10 21:31:02 UTC (rev 862) @@ -23,6 +23,7 @@ using MySql.Data.Types; using System.Globalization; using System.Text.RegularExpressions; +using System; namespace MySql.Data.MySqlClient { @@ -262,7 +263,9 @@ private void CheckForExceptions() { - string colName = OriginalColumnName.ToLower(CultureInfo.InvariantCulture); + string colName = String.Empty; + if (OriginalColumnName != null) + colName = OriginalColumnName.ToLower(CultureInfo.InvariantCulture); if (colName.StartsWith("char(")) binaryOk = false; else if (connection.IsExecutingBuggyQuery)