Bug #25906 Typo makes GetSchema with DataTypes collection throw an exception
Submitted: 29 Jan 2007 8:46 Modified: 31 Jan 2007 16:17
Reporter: Sönke Schau Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:5.0.3 OS:Windows (Windows)
Assigned to: CPU Architecture:Any

[29 Jan 2007 8:46] Sönke Schau
Description:
In line 612 of SchemaProvider.cs the name of the column is incorrecly spelled as "LitteralSuffix" but it should read "LiteralSuffix" to function correctly.

dt.Columns.Add(new DataColumn("LitteralSuffix", typeof(string)));

How to repeat:
DbProviderFactory TargetDbProviderFactory = DbProviderFactories.GetFactory( "MySql.Data.MySqlClient" );
using ( DbConnection TargetDbConnection = TargetDbProviderFactory.CreateConnection() )
{
  TargetDbConnection.ConnectionString = "Server=localhost;User Id=user;Password=secret;Database=PortalLogs";
  TargetDbConnection.Open();
  DataTable dtdt = DbConnection.GetSchema( "DataTypes", new string[] { } );
}

Suggested fix:
Change line to

dt.Columns.Add(new DataColumn("LiteralSuffix", typeof(string)));
[29 Jan 2007 9:21] Sönke Schau
The MS documentation at http://msdn2.microsoft.com/ru-ru/library/ms254501.aspx is incorrect in stating that the name should be "LitteralSuffix". It only works with "LiteralSuffix".
[29 Jan 2007 10:41] Tonci Grgin
Hi and thanks for your complete problem report. Miss spelling is still present in latest SVN sources. Proper spelling would be "LiteralSuffix" as suggested in http://msdn2.microsoft.com/en-us/library/system.data.common.dbmetadatacolumnnames.literals...
[29 Jan 2007 11:45] Tonci Grgin
Test case attached to Bug#25907
[30 Jan 2007 22:33] Reggie Burnett
Fixed as part of the same patch for bug #25907.
[31 Jan 2007 16:17] MC Brown
A note has been added to the 5.0.4 changelog.