Bug #66415 ADO Connection.Openschema fails
Submitted: 16 Aug 2012 8:34 Modified: 22 Aug 2012 11:40
Reporter: Arno Rouschen Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:5.1.11 OS:Windows
Assigned to: Bogdan Degtyariov CPU Architecture:Any

[16 Aug 2012 8:34] Arno Rouschen
Description:
I have an app where I use ADO in order to connection to MySQL via the ODBC Connector. If I use the the 5.1.11 version of the driver then a call to Connection.Openschema crashes my application. This happens only to a particular table. Doing the same thing with other tables works. Doing the same thing with an older version of the driver works also and also when I use this table.

    

How to repeat:
Here's a little code snippet (VB6) of what I'm doing in my app:

Dim cn As New Connection
cn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data 
Source=win2k8r2db"

cn.Open
cn.OpenSchema adSchemaColumns, Array(Empty, Empty, "BLAISE_DICTIONARY", Empty)

The last line results in a crash if I use version 5.1.11. It works well with version 5.1.08.

The 'problem' table can be created by using the following DDL command:

CREATE TABLE `BLAISE_DICTIONARY` (
`DMKEY` INTEGER NOT NULL AUTO_INCREMENT, KEY `DMKEY` (`DMKEY`),
`DATAMODELNAME` VARCHAR(255),
`CHECKSUM` VARCHAR(29),
`DPT` INTEGER,
`BMI` VARCHAR(255),
`BOI` VARCHAR(255),
`SEARCHPATH` VARCHAR(255),
`ADDED` DATETIME,
`ADMINKEY` VARCHAR(255),
`COLLECTMODES` VARCHAR(255),
`CAB` MEDIUMBLOB);

ALTER TABLE `BLAISE_DICTIONARY` ADD PRIMARY KEY (`DMKEY`);
[22 Aug 2012 11:40] Bogdan Degtyariov
Arno, thanks for reporting the problem. The ODBC driver 5.1.11 crashes when the table name is longer than 15 symbols. In your case it is 17 symbols long.
This is a duplicate of bug 65200, which has been fixed recently.