Bug #25906 Typo makes GetSchema with DataTypes collection throw an exception
Submitted: 29 Jan 2007 9:46 Modified: 31 Jan 2007 17:17
Reporter: Sönke Schau
Status: Closed
Category:Connector/Net Severity:S3 (Non-critical)
Version:5.0.3 OS:Microsoft Windows (Windows)
Assigned to: Target Version:

[29 Jan 2007 9: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 10: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 11: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...).aspx
[29 Jan 2007 12:45] Tonci Grgin
Test case attached to Bug#25907
[30 Jan 2007 23:33] Reggie Burnett
Fixed as part of the same patch for bug #25907.
[31 Jan 2007 17:17] MC Brown
A note has been added to the 5.0.4 changelog.