| Bug #27670 | LOAD DATA INFILE processing does not respect TIMESTAMP default value | ||
|---|---|---|---|
| Submitted: | 5 Apr 2007 18:03 | Modified: | 10 May 2007 19:58 |
| Reporter: | Shawn Green | ||
| Status: | Closed | ||
| Category: | Server: Parser | Severity: | S3 (Non-critical) |
| Version: | 5.0.38 enterprise | OS: | Any |
| Assigned to: | Evgeny Potemkin | Target Version: | |
| Tags: | LOAD DATA INFILE, timestamp, DEFAULT | ||
[5 Apr 2007 18:03]
Shawn Green
[7 May 2007 22:55]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/26251 ChangeSet@1.2475, 2007-05-08 00:52:12+04:00, evgen@moonbone.local +3 -0 Bug#27670: LOAD DATA does not set TIMESTAMP default value when there is not enough data. The LOAD DATA sets the current time in the TIMESTAMP field with CURRENT_TIMESTAMP default value when the field is detected to be a null. But when the LOAD DATA command loads data from a file that doesn't contain enough data for all fields then the rest of fields are simply set to null without any check. This leads to no value being inserted to such TIMESTAMP field. Now the read_sep_field() and the read_fixed_length() functions set current time to the TIMESTAMP field with CURRENT_TIMESTAMP default value in all cases when a NULL value is loaded to the field.
[8 May 2007 22:25]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/26331 ChangeSet@1.2475, 2007-05-09 00:23:16+04:00, evgen@moonbone.local +3 -0 Bug#27670: LOAD DATA does not set CURRENT_TIMESTAMP default value for a TIMESTAMP field when no value has been provided. The LOAD DATA sets the current time in the TIMESTAMP field with CURRENT_TIMESTAMP default value when the field is detected as a null. But when the LOAD DATA command loads data from a file that doesn't contain enough data for all fields then the rest of fields are simply set to null without any check. This leads to no value being inserted to such TIMESTAMP field. Now the read_sep_field() and the read_fixed_length() functions set current time to the TIMESTAMP field with CURRENT_TIMESTAMP default value in all cases when a NULL value is loaded to the field.
[10 May 2007 8:38]
Bugs System
Pushed into 5.1.19-beta
[10 May 2007 8:52]
Bugs System
Pushed into 5.0.42
[10 May 2007 19:58]
Paul DuBois
Noted in 5.0.42, 5.1.19 changelogs. LOAD DATA did not use CURRENT_TIMESTAMP as the default value for a TIMESTAMP column for which no value was provided.
