Bug #61873 | SQLGetData returns incorrect length under 64 bit compile | ||
---|---|---|---|
Submitted: | 14 Jul 2011 21:58 | Modified: | 10 Aug 2011 16:17 |
Reporter: | Corwin Joy | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 3.51.26 | OS: | Linux |
Assigned to: | Bogdan Degtyariov | CPU Architecture: | Any |
[14 Jul 2011 21:58]
Corwin Joy
[17 Jul 2011 13:00]
Valeriy Kravchuk
Are you sure your MyODBC version is 64-bit? How exactly you compiled your sample program? I'd prefer to see the exact command line.
[18 Jul 2011 16:40]
Corwin Joy
I did not compile the MySQL Connector package myself. Instead I am using the standard Redhat packages. What I have installed is: > yum info mysql-connector-odbc.x86_64 Installed Packages Name : mysql-connector-odbc Arch : x86_64 Version : 3.51.26r1127 Release : 1.el5 Size : 450 k Repo : installed Summary : ODBC driver for MySQL URL : http://www.mysql.com/downloads/api-myodbc.html License : GPLv2 with exceptions Description: An ODBC (rev 3) driver for MySQL, for use with unixODBC. And I have the corresponding MySQL package for 64 bit. > yum info mysql.x86_64 Installed Packages Name : mysql Arch : x86_64 Version : 5.0.77 Release : 4.el5_6.6 Size : 8.1 M Repo : installed Summary : MySQL client programs and shared libraries. URL : http://www.mysql.com License : GPLv2 with exceptions Description: MySQL is a multi-user, multi-threaded SQL database server. MySQL is : a client/server implementation consisting of a server daemon : (mysqld) and many different client programs and libraries. The base : package contains the MySQL client programs, the client shared : libraries, and generic MySQL files. > yum info mysql-server.x86_64 Installed Packages Name : mysql-server Arch : x86_64 Version : 5.0.77 Release : 4.el5_6.6 Size : 22 M Repo : installed Summary : The MySQL server and related files. URL : http://www.mysql.com License : GPLv2 with exceptions Description: MySQL is a multi-user, multi-threaded SQL database server. MySQL is : a client/server implementation consisting of a server daemon : (mysqld) and many different client programs and libraries. This : package contains the MySQL server and some accompanying files and : directories.
[1 Aug 2011 18:08]
Lawrenty Novitsky
I would be more interested to know if the problem repeatable with latest driver release, which is 3.51.28
[10 Aug 2011 13:04]
Bogdan Degtyariov
Verified with 3.51.26
[10 Aug 2011 13:05]
Bogdan Degtyariov
test case
Attachment: bug61873.c (text/plain), 2.77 KiB.
[10 Aug 2011 13:05]
Bogdan Degtyariov
Test case displays: sizeof(SQLLEN)=8 StrLen_or_IndPtr: [DEC: 18446744073709551615][HEX: FFFFFFFFFFFFFFFF] GET DATA StrLen_or_IndPtr: [DEC: 18446744069414588416][HEX: FFFFFFFF00001000]
[10 Aug 2011 13:07]
Bogdan Degtyariov
This problem has been fixed in 3.51.28. Here is the output from the same test case when using 3.51.28: sizeof(SQLLEN)=8 StrLen_or_IndPtr: [DEC: 18446744073709551615][HEX: FFFFFFFFFFFFFFFF] GET DATA StrLen_or_IndPtr: [DEC: 4096][HEX: 0000000000001000] Closing the bug
[10 Aug 2011 16:17]
Corwin Joy
Thank you for looking into this! Much appreciated and I'm glad to hear the bug is resolved in the new version. Thanks again. Corwin