Looking at the referers for this weblog, it seems a lot of you out there upgrading to Connector/J 3.1 are having issues with the two following changes:
Connector/J 3.1 now detects data truncation, and throws exceptions when it happens
Connector/J 3.1 doesn‘t silently convert all-zero date/time/timestamp/datetime values to NULL like Connector/J 3.0.x and older did.
Since we‘re trying to make Connector/J be JDBC-compliant out-of-the-box without any special configuration values, it sometimes surprises users when these changes happen (they‘re documented in the CHANGES file that comes with the driver, and we‘ve started to do a better job of categorizing them in an ‘For Upgraders‘ section in our manual).
Let‘s deal with data truncation first. The MySQL server started to be able to do something meaningful with truncation in version 4.1. Before that, it would tell you that data for some columns was …
[Read more]