Bug #50173 | presence of NULL character (ASCII 00) in a Varchar/text result in trancation | ||
---|---|---|---|
Submitted: | 8 Jan 2010 9:18 | Modified: | 2 Feb 2010 11:13 |
Reporter: | uma rengasamy | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / ODBC | Severity: | S1 (Critical) |
Version: | 5.1.40sp1-enterprise-gpl-advanced-log | OS: | Linux (REDHAT 5.2) |
Assigned to: | CPU Architecture: | Any |
[8 Jan 2010 9:18]
uma rengasamy
[8 Jan 2010 10:06]
uma rengasamy
you might need to add SQLCA copybook to run the program in wirking storage section if you try to replicate it using COBOL. exec sql include "sqlca.cpy" end-exec.
[8 Jan 2010 11:50]
Bogdan Degtyariov
Hello Uma, Which ODBC Driver Manager you are currently using? Is it UnixODBC, iODBC, DataDirect or something else? We do not have the Cobol interpreter to test your program. Can you please enable the ODBC trace on your machine and attach it to the bug report? In case of UnixODBC as the most popular driver manager in Unix/Linux systems you would need to add the following section in odbcinst.ini file: [ODBC] TraceFile = /tmp/sql.log Trace = Yes Thanks.
[8 Jan 2010 13:38]
uma rengasamy
UnixODBC trace
Attachment: ODBCTrace.log (application/octet-stream, text), 13.25 KiB.
[8 Jan 2010 13:38]
uma rengasamy
Mysql server log
Attachment: localhost.log (application/octet-stream, text), 16.83 KiB.
[8 Jan 2010 13:43]
uma rengasamy
We are using UNIXODBC manager -> unixODBC-2.2.11-7.1 attaching the ODBCtrace and MYSQL server log.. both proves that the 1st query using host variable for the emp column is getting truncated at the 1st occurance of NULL char.. Hope that helps.
[11 Jan 2010 3:59]
Bogdan Degtyariov
Uma, Thank you for attaching the logs. I will check them and let you know my findings. Thanks.
[11 Jan 2010 6:58]
Bogdan Degtyariov
Uma, I have noticed that your application is trying to set the SQL_ATTR_PARAMSET_SIZE statement attribute. After that the driver returns the "not supported" error. Nevertheless, the application is binding buffers and expecting the query to be executed multiple times. The arrays of parameters are implemented in the latest revisions of MyODBC driver: https://launchpad.net/~myodbc-developers/myodbc/paramarrays You can wait for the next official release of Connector/ODBC 5.1.7 or build the driver from sources that are accessible from the above launchpad address.
[11 Jan 2010 7:04]
Tonci Grgin
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html Explanation: As Bogdan said, you should try with latest sources or wait for new driver release. In case it does not fix your problem, please reopen the report.
[11 Jan 2010 8:09]
uma rengasamy
any expected date of ODBC driver 5.1.7 release? This is critical for us.. our delivery has huge impact on it.. expected date will help us plan for delivery properly. Please suggest the date.
[11 Jan 2010 9:08]
Tonci Grgin
Uma, no there has been no date set yet but you can build driver from source repository and test.
[11 Jan 2010 9:13]
Tonci Grgin
Or check if patch is present in snapshots (although I don't see it, it's probably just in branch Bogdan mentioned): http://downloads.mysql.com/snapshots/mysql-connector-odbc-5.1/mysql-connector-odbc-5.1.7r8...
[11 Jan 2010 14:57]
uma rengasamy
The delivered source is not working.. we will wait for the release or if you have some intermediate patch we can use that will be great.. Just to add the SELECT query also has the same issue..please consider this for SELECT clause. any all other possible clauses where truncation happens due to presence of NULL.
[12 Jan 2010 3:07]
Bogdan Degtyariov
Uma, I will make a new 32-bit Linux build for you today. Thanks for your patience.
[12 Jan 2010 11:13]
Bogdan Degtyariov
Uma, Please find the linux snapshot build here: ftp://ftp.mysql.com/pub/mysql/download/mysql-connector-odbc-5.1.7r863_20100112_1019-linux-... Please generate another ODBC trace if this build does not work for you. Thanks.
[12 Jan 2010 12:30]
uma rengasamy
unfortunately the FTP site is blocked in our network, could you attach the version here and we will try that.. appreciate your quick response.
[12 Jan 2010 12:52]
Bogdan Degtyariov
Unfortunately, files bigger than 500K are not accepted by our bugs tracking system. I will check possibilities with HTTP.
[12 Jan 2010 12:55]
uma rengasamy
send me a ZIP version to email IDs: abhishek.chatterjee@wipro.com uma.r66@wipro.com that will be great.
[13 Jan 2010 7:48]
uma rengasamy
We followed the below methods to compile the source , since we havent received the complete pack . 1.Overwritten exsisting lib files with ftp://ftp.mysql.com/pub/mysql/download/mysql-connector-odbc-5.1.7r863_20100112_1019-linux-... 2.Overwritten http://downloads.mysql.com/snapshots/mysql-connector-odbc-5.1/mysql-connector-odbc-5.1.7r8... with ftp://ftp.mysql.com/pub/mysql/download/mysql-connector-odbc-5.1.7r863_20100112_1019-linux-... and build the source . Still the error persists Kindly guide us if the above method is incorrect sor Kindly send us the complete pack . Attached the ODBC trace . Thanks and Regards Uma.R
[13 Jan 2010 7:52]
uma rengasamy
Trace log form new source
Attachment: odbctrace.log (application/octet-stream, text), 30.61 KiB.
[13 Jan 2010 8:19]
Bogdan Degtyariov
Uma, As I see in the ODBC trace, the driver still displays the not supported error: DIAG [01S02] [MySQL][ODBC 5.1 Driver][mysqld-5.1.40sp1-enterprise-gpl-advanced-log]Param arrays not supported This means that you are still using the old driver. Probably the odbc.ini configuration file has the reference to the old version of the driver as libmyodbc5-5.1.6.so instead of libmyodbc5-5.1.7.so. Can you attach both odbcinst.ini and odbc.ini files to the bug report? Thanks.
[13 Jan 2010 10:07]
uma rengasamy
Attached the zip file which contains 1.so files which we used 2.odbcinst 3.odbc 4.odbctrace Is there any other way to check the ODBC Driver version ??? Regards Uma.R
[13 Jan 2010 10:17]
uma rengasamy
odbc-Details
Attachment: Mysql.zip (application/x-zip-compressed, text), 3.06 KiB.
[2 Feb 2010 11:13]
Bogdan Degtyariov
Marking the report as not a bug. The problem was in Cobol interpretation of string data.