View Issue Details

IDProjectCategoryView StatusLast Update
0004064SymmetricDSImprovementpublic2019-08-23 16:43
Reporterelong Assigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.9.0 
Target Version3.9.22Fixed in Version3.9.22 
Summary0004064: Allow zero date on MySQL or convert to null otherwise
DescriptionAdd 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.
TagsNo tags attached.

Relationships

related to 0004065 closedelong Allow zero date on MySQL or convert to null otherwise (3.10) 

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.9 8d6d4760

2019-08-08 08:33:44

admin

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

Issue History

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