Bug #1302 | Silent failure updating a blob and a non-blob column | ||
---|---|---|---|
Submitted: | 16 Sep 2003 8:35 | Modified: | 16 Sep 2003 9:42 |
Reporter: | Karoly Lorentey | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.0.14 | OS: | Linux (Debian GNU/Linux unstable) |
Assigned to: | CPU Architecture: | Any |
[16 Sep 2003 8:35]
Karoly Lorentey
[16 Sep 2003 9:42]
Alexander Keremidarski
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php You use wrong syntax. update test set a = 2 and b = 'bar' where a = 1; MySQL parses this as: update test set a = (2 and b = 'bar') where a = 1; b = 'bar' -> false i.e. 0 2 and 0 -> false i.e. 1 Therefore a becomes 0 Proper way to update multiple columns at once is to use comma as separator: update test set a = 2, b = 'bar' where a = 1;
[16 Sep 2003 10:07]
Alexander Keremidarski
Sorry for mistake. 2 and 0 -> false i.e. 0 not 1 as I originaly wrote
[16 Sep 2003 10:50]
Karoly Lorentey
But of course! Sorry for my brainfart, and thanks for the quick reply! :-)