Bug #113012 SQLGetTypeInfo function returns incorrect data for LITERAL_PREFIX and SUFFIX
Submitted: 8 Nov 2023 14:15 Modified: 30 May 14:28
Reporter: Imran Hussain Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:9.3 OS:Windows (x86 and x64)
Assigned to: CPU Architecture:Any

[8 Nov 2023 14:15] Imran Hussain
Description:
SQLGetTypeInfo function in the driver is supposed to return information about data types in the driver. The resultset returns incorrect values for LITERAL_PREFIX and LITERAL_SUFFIX. It is currently returning a single quote for every datatype, including integers. The prefix and suffix for integers should be blank.

How to repeat:
The easiest way to produce is to use the ODBC Test utility from Microsoft that comes with ODBC SDK. Here are the steps:

1 - Connect to a MySQL backend by pressing CTRL+F
2 - Select Catalog/SQLGetTypeInfo
3 - Type Ctrl+R to get the results

The 4th and 5th column always contains a single quote, even for numeric types.

Suggested fix:
Use version 5.x
[8 Nov 2023 20:30] Imran Hussain
The prefix/suffix should be NULL (not blank) for numeric data types.
[25 Jul 2024 13:04] MySQL Verification Team
Hello Imran Hussain,

Thank you for the bug report.
Please upgrade to latest version and report us back if issue persist even in latest version along with test case. Thank you.

Regards,
Ashwini Patil
[25 Jul 2024 19:10] Imran Hussain
I tried upgrading to 8.0.37 (32-bit) and 9.0.0 (64-bit), but the problem is not fixed in either one. Are you referring to a newer build than these?
[30 May 12:29] MySQL Verification Team
Yes, Please try with Connector/ODBC 9.3 or 8.0.42 and let us know if you are still facing any issues.
[30 May 14:28] Imran Hussain
I confirm the bug is fixed in 9.3