[MDEV-8771] Comparison of a TIME column to various literals works differently Created: 2015-09-08 Updated: 2018-09-17 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Temporal Types |
| Affects Version/s: | 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 | ||
| Description |
|
This script:
returns
which means it performs the datetime-to-time conversion using CURRENT_DATE only when a TIME field is compared to a TIMESTAMP literal, and does not perform conversion otherwise. Perhaps it could do conversion in more cases, e.g. at least for TIMESTAMP-alike string literals '2001-01-01 10:20:30'. Not sure about the numbers. MySQL-5.7 in the same scenario returns this result:
which means it does not perform TIME-to-DATETIME conversion at all, which is probably even worse. |