Bug #115342 | Ambiguous Boolean Handling in DELETE Statement. | ||
---|---|---|---|
Submitted: | 14 Jun 2024 18:32 | Modified: | 14 Jun 2024 18:41 |
Reporter: | Govinda Sapkota | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | OS: | Windows | |
Assigned to: | CPU Architecture: | Any | |
Tags: | DatabaseError, MySQL, QuerySyntax, SQL |
[14 Jun 2024 18:32]
Govinda Sapkota
[14 Jun 2024 18:41]
MySQL Verification Team
Hi Mr. Sapkota, Thank you for your bug report. SQL Standard does prescribe that datatypes should not be mixed in any expression, what so ever. That would have resulted in most of our customers and users being unable to design their queries. Furthermore, all relational databases in the world, just like MySQL, try to come up with some common denominators for the comparison of different types. That is making life much easier to programmers, because not all of them are experts in query design. Hence, in your case where you have the expression cart_id='127' which can resolve to TRUE or FALSE, from one row to another, you have to AND compare it to non-Boolean value of '128' which is a string, but it probably always evaluates to TRUE. That is a design that is intentional in all relational databases and it is here to stay. Not a bug.