Bug #29078 Crash while using ODBCAdapter.FillSchema
Submitted: 13 Jun 2007 16:22 Modified: 28 May 2013 8:35
Reporter: Jyotsna Sonawane Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.15 OS:Windows (Windows server 2003)
Assigned to: Bogdan Degtyariov CPU Architecture:Any
Tags: ERROR [HY010] [MySQL][ODBC 3.51 Driver][mysqld-5.0.32-Debian_7etch1-log]

[13 Jun 2007 16:22] Jyotsna Sonawane
Description:
We used FillSchema successfully with version 3.51.12. But with version 3.51.15, we are experiencing crash with following stack trace. Our customer is very much worried about future versions of the product. It is a significant feature we are missing due to this crash.

-------
ERROR [HY010] [MySQL][ODBC 3.51 Driver][mysqld-5.0.32-Debian_7etch1-log]

at System.Data.Odbc.OdbcDataReader.NextResult(Boolean disposing, Boolean allresults)
at System.Data.Odbc.OdbcDataReader.NextResult()
at System.Data.Common.DataAdapter.FillSchemaFromReader(DataSet dataset, DataTable datatable, SchemaType schemaType, String srcTable, IDataReader dataReader)
at System.Data.Common.DataAdapter.FillSchema(DataSet dataSet, SchemaType schemaType, String srcTable, IDataReader dataReader)
at System.Data.Common.DbDataAdapter.FillSchemaInternal(DataSet dataset, DataTable datatable, SchemaType schemaType, IDbCommand command, String srcTable, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillSchema(DataSet dataSet, SchemaType schemaType, IDbCommand command, String srcTable, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillSchema(DataSet dataSet, SchemaType schemaType)

How to repeat:
1. setup mysql database on debian
2. install mysql connector 3.51.15 on windows server 2003
3. create a .NET application, which does following

IDataAdapter objAgreementAdapter = objCn.CreateSelectAdapter("SELECT * FROM " + tbl_publish_agreement);

System.Data.Odbc.OdbcCommandBuilder agreementCmdBuilder = new  System.Data.Odbc.OdbcCommandBuilder(objAgreementAdapter as System.Data.Odbc.OdbcDataAdapter);

objAgreementAdapter.FillSchema(objDs, SchemaType.Source);

4. you have a crash

Suggested fix:
Unknown to us. The workaround is to uninstall 3.51.15 and install 3.51.12
[14 Jun 2007 6:37] Tonci Grgin
Hi Jyotsna and thanks for your report. In order to get it processed quickly you need to provide as much info as possible, i.e.:
 - Full C# test case
 - DDL / DML statements if needed in form suitable for import via cl client
 - OS info (gather with MDAC utility if needed)
 - ODBC DM (driver manager) traces / general query log from server
[14 Jul 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[3 Mar 2008 10:21] Tonci Grgin
I really tried but no class seems to support "CreateSelectAdapter"... Google + Yahoo return like 2-3 distinctive matches. I presume this was neither urgent nor real problem for reporter as no info is provided...

            //IDbConnection objCn = null;
            //SqlConnection objCn = null;
            System.Data.OleDb.OleDbConnection objCn = null;
            objCn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=test; UID=root; pwd=*****;PORT=3306;OPTION=3";
            objCn.Open();

            //IDataAdapter objAgreementAdapter = null;
            System.Data.OleDb.OleDbDataAdapter objAgreementAdapter = null;
            objAgreementAdapter = CreateSelectAdapter(objCn,"SELECT * FROM mysql.user");
and some other classes too.
[28 May 2013 8:35] Bogdan Degtyariov
Cannot continue without feedback from the reporter.
The bug is closed.