Bug #112724 | Incorrect type conversions between VARCHAR and BOOLEAN types | ||
---|---|---|---|
Submitted: | 14 Oct 2023 3:58 | Modified: | 16 Oct 2023 12:27 |
Reporter: | Paul Smith | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[14 Oct 2023 3:58]
Paul Smith
[16 Oct 2023 12:27]
MySQL Verification Team
Hi Mr. Smith, Thank you for your bug report. However, it is not a bug. SQL standard requires strict type checking, which MySQL (and many more) has not implemented as we, being human beings, would receive so many error from the RDBMS. Hence, it was left to each implementation to make it's own decision. MySQL has gone, from the very beginnings in 1997, for finding a common denominator. Common denominator between Boolean and a string is a floating point. Since "abc" can not be converted to floating point, it returns 0. MySQL does not plan to implement strict type checking soon. This is all explained in our Reference Manual, in a chapter on expression evaluation. Not a bug.