Bug #23574 Bug in the MyODBC driver when connected to an application that usese UNICODE
Submitted: 24 Oct 2006 8:30 Modified: 29 May 2013 12:04
Reporter: axel biewer Email Updates:
Status: Closed Impact on me:
Category:Connector / ODBC Severity:S2 (Serious)
Version:MYSQL ODBC Driver 3.51 OS:Microsoft Windows (Windows XP)
Assigned to: CPU Architecture:Any
Tags: Buffer exceeded, SQLGetCussorName(), Unicode

[24 Oct 2006 8:30] axel biewer
Sybase told us to report this error to MYSQL:

We have build a PowerBuilder Version 10.5 application that connects via ODBC Driver 3.51 to a MYSQL Database.

Accidently the app crashes due to select-actions on the MYSQL-DB.

Sybase told us that the error is due to the following fact:

It is a bug in the MyODBC driver. The SQLGetCussorName() function's 3rd argument should be the size of the buffer in number of bytes, not chars. Since PB 10 and later uses unicode, the number of bytes has doubled.

How to repeat:
Connect via a host application that is UNICODE-base to MYSQL via ODBC-Driver 3.51. Then execute SELECT-Statements.
[24 Oct 2006 8:37] Valeriy Kravchuk
Thank you for a problem report. What exact version of Connector/ODBC you had used (3.51.x, x is important, with 3.51.12 being the latest officially released)?
[24 Oct 2006 8:44] axel biewer
We are using the latest Version: 3.51.12
[24 Oct 2006 9:57] axel biewer
I go this further information from SYBASE:

"We give the number counted with byte.This is from odbc help file. But obviouslly MYSQL double it and set the last two bytes to zero.It overwrite pb memory. 
So the issue that MYSQL should NOT double the size."
[24 Oct 2006 10:44] Tonci Grgin
Hi Axel and thanks for your problem report. In MyODBC 3.51 documentation it is stated that driver is not unicode capable, ie. 3.51 maps unicode (W) functions to non-unicode ones, thus your problem. Full unicode support is scheduled for version 5. So can you please test with connector/ODBC 5 even if it's still beta to see if you will get same problems because UC support will not be fixed in 3.51 branch.
[25 Nov 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[29 May 2013 12:04] Bogdan Degtyariov
I'm closing this bug because I can not continue without feedback from the reporter. If you have new info, please reopen the report.