Bug #116087 | Time type not formatted correctly in SSPS mode | ||
---|---|---|---|
Submitted: | 12 Sep 2024 10:44 | Modified: | 4 Mar 20:28 |
Reporter: | Lukasz Selwa | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
Version: | 9.0.0 | OS: | Any |
Assigned to: | Bogdan Degtyariov | CPU Architecture: | Any |
Tags: | prepared statement, time |
[12 Sep 2024 10:44]
Lukasz Selwa
[17 Sep 2024 9:38]
Lukasz Selwa
Also I noticed that this code doesn't handle printing milliseconds in the sam way as in NO_SPSS mode. It would be best if it instead reused function "int my_time_to_str(const MYSQL_TIME &my_time, char *to, uint dec)" from my_time.h
[18 Sep 2024 0:34]
Bogdan Degtyariov
Hi Lukasz, Thank you very much for the detailed description of the bug, the test code and for proposing how to fix it. The bug is verified.
[18 Sep 2024 9:14]
MySQL Verification Team
Thank you, Bogdan, so much !!!!!!
[3 Mar 7:10]
Bogdan Degtyariov
Posted by developer: The problem was in the code logic, which did not take into account that the number for hours can be three digits where the values range from -838 to 838. This is now fixed and a unit test added to check for this issue, including the cases with fractional parts of the second having up to 6 digits of precision.
[4 Mar 20:28]
Daniel So
Posted by developer: Added the following entry to the Connector/ODBC 9.3.0 changelog: "When using server-side prepared statements, fetching a time column bound to the SQL_C_CHAR type returned an incorrect string if the hour value had 3 digits."