Bug #32043 | Some Error While Updating a row | ||
---|---|---|---|
Submitted: | 2 Nov 2007 5:26 | Modified: | 2 Nov 2007 8:23 |
Reporter: | Anish R | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 5.0.27 | OS: | Windows |
Assigned to: | CPU Architecture: | Any | |
Tags: | insert, NOT NULL, UPDATE |
[2 Nov 2007 5:26]
Anish R
[2 Nov 2007 8:23]
Hartmut Holzgraefe
Depending on your SQL_MODE settings such illegal values are either changed to the default value for the column ('' in this case) and a warning is created, or an error is thrown for the strict modes. In your case the update was accepted so the first of the above was the case and you sould have received a result like: mysql> update ahs_sports set sport_desc = NULL where sport_id=1; Query OK, 1 row affected, 1 warning (0.31 sec) Rows matched: 1 Changed: 1 Warnings: 1 mysql> show warnings; +---------+------+------------------------------------+ | Level | Code | Message | +---------+------+------------------------------------+ | Warning | 1048 | Column 'sport_desc' cannot be null | +---------+------+------------------------------------+ 1 row in set (0.00 sec)