Incorrect Column Information From MySQL Tables Using Dg4ODBC 11g and MySQL ODBC Driver

(Doc ID 1264912.1)

Last updated on JANUARY 18, 2017

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 11.1 to 11.2]
Information in this document applies to any platform.


When using DG4ODBC 11g and the MySQL ODBC 5.1.7 driver incorrect column information may be returned in a select or describe.
For example,  a MySQL table may have 3 columns but in a select or a describe only the first column is returned.
The MySQL create statement -

CREATE TABLE `Student` (
  `StudentId` int(11) NOT NULL AUTO_INCREMENT,
  `FirstName` varchar(35) DEFAULT NULL,
  `MiddleName` varchar(255) DEFAULT NULL
  `Overdue` tinyint(1) DEFAULT NULL,
  `UUID` varchar(36) NULL,
  `MessageBody` mediumtext )

From Oracle -

SQL> select * from "Student"@dg4odbc;


SQL> describe "Student"@dg4odbc
Name                                                     Null?      Type
----------------------------------------- -------- ----------------------------
StudentId                                                             NUMBER(10)

For a different table only 1 row may be returned when there are more rows in the MySQL table.

Using a different driver, for example, Data Direct v6 ODBC driver will return the correct results -

SQL> describe "Student"@dg4odbc_dd
Name Null? Type
----------------------------------------- -------- ----------------------------
FirstName VARCHAR2(35)
MiddleName VARCHAR2(255)
Overdue NUMBER(3)
MessageBody LONG


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms