My Oracle Support Banner

Character Data Returned With Spaces From MySQL Using DG4ODBC (Doc ID 1068854.1)

Last updated on JANUARY 30, 2022

Applies to:

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


A select of data from MySQL using DG4ODBC 11.1 returns character data with spaces between the characters.
For example -

select "id", "username" from user_table@mysql where "id"=2;

id username
-- ------------
2  s m i t h

A dump of the data from Oracle shows the following -

select dump("username") from user_table@mysql where "id"=2;
Typ=1 Len=20: 0,0,0,115,0,0,0,109,0,0,0,105,0,0,0,1160,0,0,0,104

The same select run against MySQL using ISQL returns the correct data -

select id, username from user_table where id=2 ;

| id | username |
| 2 | smith |

The character set used by MySQL is UTF8 and by Oracle is AL32UTF8.


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

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