[MDEV-27827] TIMEDIFF() function can return wrong values Created: 2022-02-13 Updated: 2022-02-15 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.6.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Robert Dyas | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
debian buster |
||
| Description |
|
If the difference between two datetime values is too large TIMEDIFF() returns the wrong value. Example: This appears to be because there is an upper limit on a time value. It would be better if calling TIMEDIFF() on two datetimes that overflows this value caused an error so the wrong values are not accidently used. |
| Comments |
| Comment by Alice Sherepa [ 2022-02-15 ] | |||||||||
|
| |||||||||
| Comment by Robert Dyas [ 2022-02-15 ] | |||||||||
|
Yes, but this doesn't seem like the best behavior to me as bugs could easily creep in. I would think Error or NULL returned if warning is issued would be better. Easier to catch mistakes. |