My Oracle Support Banner

Incorrect Column Information From MySQL Tables Using Dg4ODBC 11g and MySQL ODBC Driver (Doc ID 1264912.1)

Last updated on JUNE 08, 2023

Applies to:

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

Symptoms



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;

StudentId
----------
1

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
----------------------------------------- -------- ----------------------------
StudentId NOT NULL NUMBER(10)
FirstName VARCHAR2(35)
MiddleName VARCHAR2(255)
Overdue NUMBER(3)
UUID VARCHAR2(36)
MessageBody LONG


Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.