| Bug #41091 | UPDATE Syntax error is not captured and displayed | ||
|---|---|---|---|
| Submitted: | 28 Nov 2008 12:35 | Modified: | 28 Nov 2008 14:30 |
| Reporter: | Nidhin Asokan | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Errors | Severity: | S3 (Non-critical) |
| Version: | 5.0.51a | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[28 Nov 2008 12:35]
Nidhin Asokan
[28 Nov 2008 14:30]
Valeriy Kravchuk
Sorry, but this is not a bug. This statement
UPDATE data_set SET description='files size'
AND name='fsize' where id='0';
is interpreted like
UPDATE data_set SET description=('files size' AND name='fsize') where id='0';
So, the result of AND with character arguments (they are implicitly casted to DOUBLE), 0 in non-strict SQL mode, is assigned to description column. In strcit mode you will get erro message like this:
mysql> update tt set c1 = 'a' AND c2='b';
ERROR 1292 (22007): Truncated incorrect DOUBLE value: 'a'
All this is expected and documented behaviour.
