Bug #56688 | JDBC - insert error - field doesn't have a default value - NOT NULL field | ||
---|---|---|---|
Submitted: | 9 Sep 2010 12:04 | Modified: | 9 Sep 2010 14:22 |
Reporter: | N N | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 5.1.13 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | DEFAULT, field, jdbc, not, null, value |
[9 Sep 2010 12:04]
N N
[9 Sep 2010 14:22]
Mark Matthews
This isn't a bug with the JDBC driver. The JDBC driver sets the sql_mode to STRICT_TRANS_TABLES, as this is the mode that aligns with JDBC specification requirements for things like missing values for fields with no defaults, truncation errors, etc. If there is no DEFAULT value for a field, this is an error according to the SQL standard, and thus the JDBC specification, and the driver must follow this behavior.