Bug #114058 | The return value of the CAST(... AS UNSIGNED) expression is out of range. | ||
---|---|---|---|
Submitted: | 20 Feb 2024 7:28 | Modified: | 20 Feb 2024 11:06 |
Reporter: | Bob Wong | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 8.0.35 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[20 Feb 2024 7:28]
Bob Wong
[20 Feb 2024 11:06]
MySQL Verification Team
Hi Mr. Wong, Thank you very much for your bug report. However, this is not a bug. Unsigned numbers do not have negative values. Also, since you did not precise the width of the integer column, it has defaulted to the longest integer column type available. This type of conversion is prohibited by SQL standard, which means that (by the standard) you would get no result, but the error message. Hence, it is up to each RDBMS implementation to define its own conversion rules. MySQL has chosen the best available one and it will not be changed. Not a bug.