[MDEV-17385] MICROSECOND() returns confusing results with an out-of-range TIME-alike argument Created: 2018-10-07 Updated: 2018-11-26 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data types, Temporal Types |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Notice a similar bug MICROSECOND(arg) can return 999999 in some contexts where TIME(arg) returns a result without fractional digits. Confusing examples when a number gets converted to '838:59:59.999999'
More confusing examples when a string gets converted to '838:59:59.999999'Intuitively, an explicit conversion from string to time using the TIME() function, and an implicit conversion of a function argument (from a non-TIME actual parameter to TIME formal parameter) should return the same result. But they do not, because of different ways of precision detection for string arguments (mentioned in the previous paragraph):
|