Bug #42110 GetSchema("Columns") throw an exception with MySQL 3.23.49-nt
Submitted: 14 Jan 2009 13:37 Modified: 4 Aug 2009 16:03
Reporter: Roger ARBOGAST Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:5.2.5 OS:Windows (XP SP3)
Assigned to: Reggie Burnett CPU Architecture:Any
Tags: 3.23, GetSchema

[14 Jan 2009 13:37] Roger ARBOGAST
Description:
After opening a connexion on a MySQL 3.23.49-nt database, the command GetSchema("Columns") throw me this exception :

L'exception System.ArgumentException n'a pas été gérée
  Message="Le format de la chaîne d'entrée est incorrect.Impossible de stocker <Dynamic> dans la colonne VERSION. Type attendu est Int64."
  Source="System.Data"
  StackTrace:
       à System.Data.DataColumn.set_Item(Int32 record, Object value)
       à System.Data.DataRow.set_Item(DataColumn column, Object value)
       à System.Data.DataRow.set_Item(String columnName, Object value)
       à MySql.Data.MySqlClient.SchemaProvider.FindTables(DataTable schemaTable, String[] restrictions)
       à MySql.Data.MySqlClient.SchemaProvider.GetTables(String[] restrictions)
       à MySql.Data.MySqlClient.SchemaProvider.GetColumns(String[] restrictions)
       à MySql.Data.MySqlClient.SchemaProvider.GetSchemaInternal(String collection, String[] restrictions)
       à MySql.Data.MySqlClient.SchemaProvider.GetSchema(String collection, String[] restrictions)
       à MySql.Data.MySqlClient.MySqlConnection.GetSchema(String collectionName, String[] restrictionValues)
       à MySql.Data.MySqlClient.MySqlConnection.GetSchema(String collectionName)
       à VI_DBcompare.BaseDonnee.LireChamps() dans T:\Développement\Interne\VI-DBcompare\v0.1.0.0\BaseDonnee.cs:ligne 121
       à VI_DBcompare.FormComparer..ctor(BaseDonnee& base1, BaseDonnee& base2) dans T:\Développement\Interne\VI-DBcompare\v0.1.0.0\FormComparer.cs:ligne 29
       à VI_DBcompare.FormMain.btnComparer_Click(Object sender, EventArgs e) dans T:\Développement\Interne\VI-DBcompare\v0.1.0.0\FormMain.cs:ligne 47
       à System.Windows.Forms.Control.OnClick(EventArgs e)
       à System.Windows.Forms.Button.OnClick(EventArgs e)
       à System.Windows.Forms.Button.PerformClick()
       à System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
       à System.Windows.Forms.ContainerControl.ProcessDialogKey(Keys keyData)
       à System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
       à System.Windows.Forms.Control.PreProcessMessage(Message& msg)
       à System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
       à System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
       à System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
       à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       à System.Windows.Forms.Application.Run(Form mainForm)
       à VI_DBcompare.Program.Main() dans T:\Développement\Interne\VI-DBcompare\v0.1.0.0\Program.cs:ligne 17
       à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       à System.Threading.ThreadHelper.ThreadStart()

How to repeat:
Create a MySqlConnection object to a v3.23.49-nt database and launch a GetSchema("Columns"); command
[14 Jan 2009 14:25] Tonci Grgin
Hi Roger and thanks for your report.

Please notice that MySQL server 3.23 is long eol-ed and was never, afair, supported by c/NET. Use Mysql server 4.1 or newer instead.
[14 Jan 2009 16:02] Roger ARBOGAST
Sorry, I wouldn't have bothered you guys if I knew this. I thought the version 3.23 was still supported because my Connector documentation says this :

"MySQL compatibility 
Connector/Net fully supports all GA versions of MySQL from 3.23 to 5.0. Connector/Net also supports the latest pre-release versions of MySQL 5.1 and 6.0. "

But now it's clear, it's OK. Thanks anyway.

PS : Someone should update the documentation ;)
[14 Jan 2009 16:19] Tonci Grgin
Roger, where did you find that quote? http://dev.mysql.com/doc/refman/5.1/en/connector-net-versions.html says:
      *

      Connector/NET 1.0 includes support for MySQL 4.0, and MySQL 5.0 features, and full compatibility with the ADO.NET driver interface.

      Connector/NET 5.0 includes support for MySQL 4.0, MySQL 4.1, MySQL 5.0 and MySQL 5.1 features. Connector/NET 5.0 also includes full support for the ADO.Net 2.0 interfaces and subclasses, includes support for the usage advisor and performance monitor (PerfMon) hooks.

      Connector/NET 5.1 includes support for MySQL 4.0, MySQL 5.0, MySQL 5.1 and MySQL 6.0 (Falcon Preview) features. Connector/NET 5.1 also includes support for a new membership/role provider, Compact Framework 2.0, a new stored procedure parser and improvements to GetSchema. Connector/NET 5.1 also includes the Visual Studio Plugin as a standard installable component.

I really doubt anyone is actually testing latest versions not only against 3.23 but against 4.0 too.
[14 Jan 2009 21:12] Roger ARBOGAST
I'm afraid I can't quote with an url like you did,

however, I can tell you how I found it.

I downloaded the package Connector/Net 5.2.5 (windows binaries) from http://dev.mysql.com/downloads/connector/net/5.2.html

After having installed the .msi in the archive, I have a file MySql.Data.chm in the Documentation folder of the installation which says the lines I've quoted in the "Compatibility" section.
[14 Jan 2009 21:17] Roger ARBOGAST
I also found the file "Documentation/Content/Compatibility.html" in the Sources archive at the same url.
[15 Jan 2009 7:50] Tonci Grgin
Roger, thanks for following up. I have assigned Tony to fix this in docs.

Thanks for your interest in MySQL!
[3 Aug 2009 10:03] Tony Bedford
It looks like the problem is in Reggie's source code/docs/CHM, not the doc team documentation XML source. Passing to Reggie for review.
[4 Aug 2009 14:23] Reggie Burnett
Fixed in 5.2.8, 6.0.5, and 6.1.1
[4 Aug 2009 16:03] Tony Bedford
Entries were added to the 5.2.8, 6.0.5 and 6.1.1 changelogs:

MySQL Connector/NET CHM documentation stated that MySQL Server 3.23 was supported.