Bug #68061 | Temporal functions truncate instead of round | ||
---|---|---|---|
Submitted: | 9 Jan 2013 20:42 | Modified: | 22 Feb 2013 4:21 |
Reporter: | Todd Farmer (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S3 (Non-critical) |
Version: | 5.6.8-rc | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[9 Jan 2013 20:42]
Todd Farmer
[10 Jan 2013 12:26]
Paul DuBois
Shouldn't this be categorized as a server bug so that a developer can look at it and determine whether it's intentional?
[30 Jan 2013 14:16]
Øystein Grøvlen
Built-in SQL function SEC_TO_TIME does not handle fractional seconds correctly. If there are more than six decimals, result is truncated instead of rounded. Solution: In function sec_to_time(), do rounding instead of truncation.
[22 Feb 2013 4:21]
Paul DuBois
Noted in 5.6.11, 5.7.1 changelogs. For arguments with fractional seconds greater than six decimals, SEC_TO_TIME() truncated, rather than rounding as it should have.