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 11.1.0.6 to 11.2.0.2 [Release 11.1 to 11.2]Information in this document applies to any platform.
Symptoms
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
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;
DUMP("USERNAME")
--------------------------------------------------------------------------------
Typ=1 Len=20: 0,0,0,115,0,0,0,109,0,0,0,105,0,0,0,1160,0,0,0,104
DUMP("USERNAME")
--------------------------------------------------------------------------------
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 |
| id | username |
| 2 | smith |
The character set used by MySQL is UTF8 and by Oracle is AL32UTF8.
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 |