View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004064 | SymmetricDS | Improvement | public | 2019-08-08 12:12 | 2019-08-23 16:43 |
Reporter | elong | Assigned To | elong | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.9.0 | ||||
Target Version | 3.9.22 | Fixed in Version | 3.9.22 | ||
Summary | 0004064: Allow zero date on MySQL or convert to null otherwise | ||||
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.9 8d6d4760 2019-08-08 08:33:44 Details Diff |
0004064: Allow zero date on MySQL or convert to null otherwise |
Affected Issues 0004064 |
|
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:12 | elong | New Issue | |
2019-08-08 12:12 | elong | Status | new => assigned |
2019-08-08 12:12 | elong | Assigned To | => elong |
2019-08-08 12:35 | elong | Status | assigned => resolved |
2019-08-08 12:35 | elong | Resolution | open => fixed |
2019-08-08 12:35 | elong | Fixed in Version | => 3.9.22 |
2019-08-08 12:36 | elong | Issue cloned: 0004065 | |
2019-08-08 12:36 | elong | Relationship added | related to 0004065 |
2019-08-08 13:00 | admin | Changeset attached | => SymmetricDS 3.9 8d6d4760 |
2019-08-23 16:43 | admin | Status | resolved => closed |