| Bug #68993 | SET IN UPDATE TABLE | ||
|---|---|---|---|
| Submitted: | 18 Apr 2013 6:51 | Modified: | 19 Apr 2013 8:03 |
| Reporter: | Mohit Angiras | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
| Version: | 5.5.15 | OS: | Linux |
| Assigned to: | CPU Architecture: | Any | |
[18 Apr 2013 6:51]
Mohit Angiras
[18 Apr 2013 9:57]
Hartmut Holzgraefe
While
UPDATE LOGO_DETAILS SET LOGO_HEIGHT='76' AND 'y' IS NULL;
would usually not make much sense
'76' AND 'y' IS NULL
*is* a valid expression though which will evaluate to either
true of false and will be converted to 1 or 0 when assigned
to LOGO_HEIGHT
Your UPDATE above is the same as
UPDATE LOGO_DETAILS SET LOGO_HEIGHT= ('76' AND 'y' IS NULL);
and your first queries equivalent is
UPDATE LOGO_DETAILS SET LOGO_HEIGHT= ('76' IS NULL);
As '76' clearly isn't NULL you're going to update all
LOGO_HEIGHT columns to the numeric value 0 with this
UPDATE
[19 Apr 2013 8:03]
MySQL Verification Team
Agreed, there is no bug here.
