[MDEV-8898] Inconsistent behaviour when comparing a YEAR column to DECIMAL or DOUBLE counterparts Created: 2015-10-05 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Temporal Types |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Comparison of a YEAR column to DECIMAL and DOUBLE literal works differently in different function and operators:
returns:
That means:
It should work the same way in all functions. Perhaps it should always compare as follows:
Another option would be to compare:
|