Bug #79686 my_bulk.exe (x64) crashed on Windows
Submitted: 17 Dec 2015 9:03 Modified: 1 Feb 2016 7:48
Reporter: William ZHANG Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:5.3.4 OS:Windows (6.1.7601)
Assigned to: CPU Architecture:Any

[17 Dec 2015 9:03] William ZHANG
Description:
Download and install the source code of ODBC 5.3.4.
CMake it and build with Visual Studio 2013 Community version.

How to repeat:
Run the tests, and it will crash.

mysql-connector-odbc-5.3.4\test\Debug> my_bulk.exe

Suggested fix:
SQLULENINTEGER numRowsFetched;

=>

SQLULEN numRowsFetched;

SQLULENINTEGER is always 32 bit, while SQLULEN is 64 bit under x64.
The same problems exists in my_crash.c and my_result2.c.
[17 Dec 2015 9:12] William ZHANG
In my_result2.c, variables outlen and len should be declared as SQLLEN instead of  SQLINTEGER.  Visual Studio 2013 will output warnings during the build.  And it will cause the program crash in debug mode, too.
[17 Dec 2015 9:21] William ZHANG
And in my_error.c, col_size should be declared as SQLULEN.
[1 Feb 2016 7:48] Chiranjeevi Battula
Hello William ZHANG,

Thank you for the bug report.

Thanks,
Chiranjeevi.