Bug #54206 | Column octet length includes terminating null byte | ||
---|---|---|---|
Submitted: | 3 Jun 2010 14:48 | Modified: | 13 Aug 2010 14:35 |
Reporter: | Lawrenty Novitsky | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
Version: | 3.51,5.1 | OS: | Any |
Assigned to: | Lawrenty Novitsky | CPU Architecture: | Any |
Tags: | SQLColAttribute SQL_DESC_OCTET_LENGTH t |
[3 Jun 2010 14:48]
Lawrenty Novitsky
[3 Jun 2010 16:29]
Lawrenty Novitsky
the patch
Attachment: bug54206.diff (application/octet-stream, text), 1.89 KiB.
[3 Jun 2010 16:39]
Lawrenty Novitsky
I have Bogdan's permission to tick review box on his behalf since we have discussed the issue with him and the patch is pretty simple. but still i'm leaving this honor to him. btw i have concerns about SQL_DESC_DISPLAY_SIZE and SQL_DESC_LENGTH too. gonna check those too. and i'm frightened a bit by simplicity of the patch :)
[3 Jun 2010 18:32]
Jim Winstead
Patch looks fine. but I seem to recall that there was at least one instance where ODBC returned a length that did include the terminator, and it's possible that this just got carried over from that. I can't find what that might have been now.
[3 Jun 2010 22:41]
Lawrenty Novitsky
Pushed as rev#713. Will go to the 3.51.28 (if everything goes well)
[18 Jun 2010 14:41]
Tony Bedford
Added an entry to the 3.51.28 changelog: SQLColAttribute for SQL_DESC_OCTET_LENGTH returned length including terminating null byte. It should not have included the null byte.
[23 Jul 2010 10:44]
Bogdan Degtyariov
same is for MyODBC 5.1
[23 Jul 2010 14:45]
Lawrenty Novitsky
Bogdan, I think i saw it in 5.1 too and even already fixed as part of work on one patch. but thank you for reminding about this bug. at least testcase needs to be merged to 5.1
[13 Aug 2010 14:35]
Tony Bedford
Updated to also appear in 5.1.7 changelog.