Bug #75956 | Inserting timestamps using a PreparedStatement and useLegacyDatetimeCode=false | ||
---|---|---|---|
Submitted: | 18 Feb 2015 14:28 | Modified: | 30 Mar 2016 20:04 |
Reporter: | Jörg Eichhorn | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | 5.1.34 | OS: | Any |
Assigned to: | Jess Balint | CPU Architecture: | Any |
[18 Feb 2015 14:28]
Jörg Eichhorn
[18 Feb 2015 14:29]
Jörg Eichhorn
Sample JUnit Test to reproduce the problem
Attachment: MySQLConnectorJTest.java (application/octet-stream, text), 5.15 KiB.
[18 Feb 2015 14:36]
Jörg Eichhorn
The code snipped missed the call of 'stmt.executeBatch();' - this is part of the unit test.
[18 Feb 2015 20:27]
Jörg Eichhorn
Possible fix for the problem
Attachment: ServerPreparedStatement.diff (application/octet-stream, text), 866 bytes.
[11 Mar 2015 12:20]
Filipe Silva
Hi Jörg, Thank you for this bug report. Is was verified as described.
[8 Jul 2015 12:04]
Jörg Eichhorn
Is the a plan to fix this issue? Without the fix there is a data loss when using prepared statements and new date time code.
[27 Oct 2015 17:08]
Jörg Eichhorn
Any news on this issue?
[30 Mar 2016 20:04]
Daniel So
Added the following entry to the Connector/J 5.1.39 changelog: "When inserting multiple timestamp values into a table with useLegacyDatetimeCode=false and useCursorFetch=true, after a null value had been inserted, further inserts could not change a timestamp's value. This fix makes sure the binding of the value is reset before a new insert takes place."