Bug #60646 | Fractional parts of second is ignored in SQLGetData | ||
---|---|---|---|
Submitted: | 25 Mar 2011 17:35 | Modified: | 1 Mar 2012 13:56 |
Reporter: | Vladislav Vaintroub | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
Version: | 5.1.9 | OS: | Any |
Assigned to: | Lawrenty Novitsky | CPU Architecture: | Any |
[25 Mar 2011 17:35]
Vladislav Vaintroub
[20 May 2011 7:06]
Bogdan Degtyariov
Vlad, Thanks for the test and the proposed solution. You really know how to make it easier for us :) The patch needs a bit of changing because SQLGetData() is not using str_to_ts() function (it calls str_to_time_st(), which works in the similar way). Well, developers on MySQL side have to do at least some part of the job :) Thanks again.
[5 Aug 2011 9:02]
Lawrenty Novitsky
will attach diff in a second. parameters part(60648) will follow
[5 Aug 2011 9:03]
Lawrenty Novitsky
the patch
Attachment: bug60646.diff (application/octet-stream, text), 15.25 KiB.
[1 Mar 2012 13:56]
Lawrenty Novitsky
The patch has been pushed to 5.1 as rev#1030(i don't know why, but log message for that revision is just wrong), with some changes applied in revisions 1032, 1034
[18 Apr 2012 23:52]
John Russell
Added to changelog for 5.1.11: The fraction member in SQL_TIMESTAMP_STRUCT was always set to 0 when a timestamp was retrieved using SQLGetData(). The fix causes the fraction member to be correctly set, with a value representing nanoseconds. This issue did not occur when a result was retrieved as a string (SQLGetData() with SQL_C_CHAR).