Bug #94535 | server ignore syntax error | ||
---|---|---|---|
Submitted: | 3 Mar 2019 16:00 | Modified: | 4 Mar 2019 14:14 |
Reporter: | mohamed atef | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.7 | OS: | Windows |
Assigned to: | CPU Architecture: | Any | |
Tags: | server ignore syntax error |
[3 Mar 2019 16:00]
mohamed atef
[4 Mar 2019 13:55]
MySQL Verification Team
Hi, Thank you for your bug report. Luckily, this is not a bug. I presume that you thought that this expression in UPDATE statement "BASE_COST=22 and ID=10001" should return the syntax error. Actually, this is not a bug but a feature !!!!! MySQL allows that boolean values are used in all DML statements. Hence the above expression will reduce to 0 or 1, depending on the values of the above two columns. This is all fully explained in our Reference Manual.
[4 Mar 2019 14:12]
MySQL Verification Team
Let me help you to understand why this is not a syntax error and, hence, definitely not a bug, although this is truly very well described in our documentation. In the UPDATE that you used, BASE_COST will be updated to 0 or 1, after evaluating the following boolean expression: 22 A?nd ID=10001 Very simple and straightforward.
[4 Mar 2019 14:14]
mohamed atef
thank you
[4 Mar 2019 14:17]
MySQL Verification Team
You are truly welcome.