Bug #30 saving a NULL value into NOT NULL column with a function
| Submitted: | 14 Jan 2003 14:54 | Modified: | 28 Jan 2003 16:53 |
|---|---|---|---|
| Reporter: | SINISA MILIVOJEVIC | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 4.0 | OS: | Any (any) |
| Assigned to: | Michael Widenius | CPU Architecture: | Any |
[28 Jan 2003 16:53]
MySQL Developer
Not full bug report, but fixed in 4.0.10
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: Sinisa> CREATE TABLE `t` ( Sinisa> `a` varchar(16) NOT NULL default '', Sinisa> `b` smallint(6) NOT NULL default '0', Sinisa> `c` datetime NOT NULL default '0000-00-00 00:00:00', Sinisa> `d` smallint(6) NOT NULL default '0', Sinisa> ) TYPE=MyISAM; Sinisa> INSERT INTO t SET a = ""; Sinisa> UPDATE t SET d=UNIX_TIMESTAMP(DATE_ADD(c, interval (b) day)) / 1; How to repeat: Suggested fix: ===== field_conv.cc 1.8 vs edited ===== *** /tmp/field_conv.cc-1.8-4065 Tue Dec 3 13:08:21 2002 --- edited/field_conv.cc Tue Jan 14 03:32:03 2003 *************** *** 118,123 **** --- 118,128 ---- field->reset(); return 0; } + if (current_thd->count_cuted_fields) + { + current_thd->cuted_fields++; // Increment error counter + return 0; + } return 1; }