View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004065 | SymmetricDS | Improvement | public | 2019-08-08 12:36 | 2019-08-29 01:45 |
Reporter | elong | Assigned To | elong | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.9.0 | ||||
Target Version | 3.10.4 | Fixed in Version | 3.10.4 | ||
Summary | 0004065: Allow zero date on MySQL or convert to null otherwise (3.10) | ||||
Description | Add a database info property for "zero date allowed" and default it to false. Only MySQL appears to allow a zero date, so that platform will set the property to true. For other databases, convert the zero date to a null so the row can load. Since the conversion will happen during loading, the user still has the option of configuring a transform to handle zero dates in another way. Some background info: the Java conversion of a string 0000-00-00 00:00:00 to timestamp object fails because there is no year 0 on the calendar. There is a second operation on failure where tries again and it's able to format the date, but returns the closest valid date of 0002-11-30. By setting the parameter of db.treat.date.time.as.varchar.enabled=true for a MySQL node, the zero date can be loaded because no conversion is done in Java. Also, the db.url parameter needs modified to remove the zeroDateTimeBehavior=convertToNull URL parameter -- that parameter only affects queries and initial load, while triggers capture zero dates regardless. | ||||
Tags | No tags attached. | ||||
SymmetricDS: 3.10 ffa2568b 2019-08-08 08:33:44 Details Diff |
0004065: Allow zero date on MySQL or convert to null otherwise (3.10) |
Affected Issues 0004065 |
|
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDatabasePlatform.java | Diff File | ||
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/DatabaseInfo.java | Diff File | ||
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/mysql/MySqlDdlBuilder.java | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-08-08 12:36 | elong | New Issue | |
2019-08-08 12:36 | elong | Status | new => assigned |
2019-08-08 12:36 | elong | Assigned To | => elong |
2019-08-08 12:36 | elong | Issue generated from: 0004064 | |
2019-08-08 12:36 | elong | Relationship added | related to 0004064 |
2019-08-08 12:57 | elong | Status | assigned => resolved |
2019-08-08 12:57 | elong | Resolution | open => fixed |
2019-08-08 12:57 | elong | Fixed in Version | => 3.10.4 |
2019-08-08 13:00 | admin | Changeset attached | => SymmetricDS 3.10 ffa2568b |
2019-08-23 16:46 | admin | Status | resolved => closed |