[MDEV-10213] Inconsistent handling of 2-digit year in const and column Created: 2016-06-12 Updated: 2017-10-20 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Temporal Types |
| Affects Version/s: | 10.1.10 |
| Fix Version/s: | 10.1 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Dylan Su | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Output:
Problem: Recreate:
|
| Comments |
| Comment by Elena Stepanova [ 2016-06-12 ] |
|
You are making an assumption that comparison to a constant is the same as comparison to a column value. The assumption is not justified.
Since the manual does not mention the YEAR type specifically in this context, I will assign it to bar to confirm that it applies to YEAR (and to a simple column value rather than a subquery result). |
| Comment by Elena Stepanova [ 2017-10-20 ] |
|
Also, if the problem is limited to YEAR(2), it's been deprecated for a long time and will probably be removed soon, so there is no point fixing anything for it specifically. I'll leave it to bar to decide. |