[MDEV-23525] Wrong result of MIN(time_expr) and MAX(time_expr) with GROUP BY Created: 2020-08-21 Updated: 2023-07-19 Resolved: 2020-08-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types, Temporal Types |
| Affects Version/s: | 10.1, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.4.16, 10.5.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | benchmarking | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
I run this script:
The first SELECT returns:
Looks correct. The second SELECT returns:
Looks wrong. The MIN and MAX values swapped. The problem happens in this code:
Notice, it compares TIME values in text format. |
| Comments |
| Comment by Alexander Barkov [ 2020-08-22 ] | ||||||||||||||||||||||||||||||||||||
|
Benchmarks: TIME(0)
TIME(6)
|