Bug #39166 problem wiht ODBC driver 5.1.5 after migrating from 5.1.0 alpha
Submitted: 1 Sep 2008 17:25 Modified: 2 Sep 2008 21:56
Reporter: jun c. Email Updates:
Status: Not a Bug Impact on me:
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.1.5 OS:Windows (XP pro)
Assigned to: CPU Architecture:Any
Tags: ODBC driver 5.1.5 problem

[1 Sep 2008 17:25] jun c.
after migrating from odbc 5.1.0 alpha to 5.1.5. LEFT is not recognized and any SQL with LEFT return "System Byte[]". Also all non CHAR cols in Concat has to be CASTed to CHAR in order to be working with ODBC 5.1.5.

Also in MS .NET Web development express software, database tables are not visible under the ODBC tcp/ip connection. 

How to repeat:
Windows XP pro. Mysql 5.0.45 with ODBC 5.1.5. MS .NET framework 2.0

Suggested fix:
Replace LEFT with DATE_FORMAT. However the return col is not date type but a string. This may cause sorting problem with ORDER BY col.
Replace any non CHAR col with CAST(col AS CHAR). 
Did not find a solution for the missing tables in a database under Database Explorer in .NET framework 2.0. Rereshing the ODBC tcp/ip connection does not solve the problem.
[1 Sep 2008 17:36] Tonci Grgin
Hi Jun and thanks for your report.

"MS .NET Web development express software". I am not sure what do you mean by this. Express versions of MS tools are generally not able to use plug-ins thus, for example, connection with c/NET will also show nothing...

Byte[1]: This is a known and well discussed problem in MySQL server. Please see Bug#10491 for a start and then search bugsdb for ODBC related bug reports regarding this. Alas, there is nothing c/ODBC can do to handle this problem reliably. However, in 5.1.5 release we added checkbox "Always handle binary function result as character data" so please check it:
* Added FLAG_NO_BINARY_RESULT connection option to always handle
>      binary function results as character data. (Bug #29402)
[2 Sep 2008 21:56] jun c.
Thanks for the reply. The software is Microsoft Visual Web Developer express 2005.