Bug #82841 | year function with invalid value should have failed | ||
---|---|---|---|
Submitted: | 2 Sep 2016 7:05 | Modified: | 2 Sep 2016 13:44 |
Reporter: | 帅 Bang | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.6, 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[2 Sep 2016 7:05]
帅 Bang
[2 Sep 2016 9:24]
Peter Laursen
In my understanding the "range of 1901 to 2155" applies to the YEAR datatype, but not the year() function (what returns a string). -- Peter -- not a MySQL/Oracle person
[2 Sep 2016 13:44]
MySQL Verification Team
Hi! Thank you for your bug report. However, Peter Laursen is quite correct in his analysis. Indeed, the "range of 1901 to 2155" applies to the YEAR datatype, but not to the year() function, which returns a string. It is explained in the documentation.