Bug #116782 | Any necessary to restrict update stmt syntax ? | ||
---|---|---|---|
Submitted: | 26 Nov 2024 9:07 | Modified: | 28 Nov 2024 11:38 |
Reporter: | ximin liang (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S4 (Feature request) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[26 Nov 2024 9:07]
ximin liang
[26 Nov 2024 11:55]
MySQL Verification Team
Hi Mr. liang, Thank you for your bug report. However, this is not a bug, since your UPDATE syntax is wrong. All SQL Standards have specified very strict syntax for DMLs and your syntax is simply wrong and unacceptable. However, this makes a good feature request. Verified as a feature request, for versions 8.0 and higher.
[26 Nov 2024 16:29]
Jean-François Gagné
This looks like a timeless issue, I met it in 2017 and blogged about it. https://jfg-mysql.blogspot.com/2017/01/oracle-mysql-and-funny-replication-breakage-2017-01...
[28 Nov 2024 11:38]
Roy Lyseng
Posted by developer: This may be a bit confusing, but the expression "100 and c3 = 1000" is valid in MySQL. In fact, similar expressions are valid in standard SQL, provided that they work on boolean values. In MySQL, we extend this so that any expressions can be converted into a boolean expression, by interpreting a zero value as false and any other value as true.
[28 Nov 2024 11:49]
MySQL Verification Team
Thank you, Roy .......