View Issue Details

IDProjectCategoryView StatusLast Update
0005395SymmetricDSBugpublic2022-08-30 13:04
Reporterelong Assigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.14.0 
Target Version3.14.1Fixed in Version3.14.1 
Summary0005395: H2 database (or load only database) gets alter timestamp(0) every time starting
DescriptionThe H2 platform incorrectly detects a model change for TIMESTAMP columns on configuration tables. In the logs, it will be shown as altering the columns:

INFO [server] [LogSqlResultsListener] [symmetric-engine-startup-1] DDL applied: ALTER TABLE "DDLTEST"."PUBLIC"."SYM_CHANNEL"
    ALTER COLUMN "CREATE_TIME" TIMESTAMP(0)
INFO [server] [LogSqlResultsListener] [symmetric-engine-startup-1] DDL applied: ALTER TABLE "DDLTEST"."PUBLIC"."SYM_CHANNEL"
    ALTER COLUMN "LAST_UPDATE_TIME" TIMESTAMP(0)

It doesn't hurt anything, but it's an unnecessary alter to run. The columns were actually created as TIMESTAMP without any specification in parenthesis, which gets the default fractional second precision of 9. However, an idiosyncrasy of H2 is that it reads back as 10 in the metadata. The other problem is that the ColumnSizeChange is created from the symmetric-schema.xml, which has null for the size, and the ModelComparator should then get the default size from the platform's database info.
Tagsddl/schema, dialect: h2

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.14 573a8389

2022-08-08 19:53:26

admin

Details Diff
0005395: H2 database detects alter timestamp(0) every time starting Affected Issues
0005395
mod - symmetric-db/src/main/java/org/jumpmind/db/alter/ModelComparator.java Diff File
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/h2/H2DdlReader.java Diff File

Issue History

Date Modified Username Field Change
2022-08-08 19:49 elong New Issue
2022-08-08 19:49 elong Status new => assigned
2022-08-08 19:49 elong Assigned To => elong
2022-08-08 19:49 elong Project SymmetricDS Pro => SymmetricDS
2022-08-08 19:49 elong Tag Attached: ddl/schema
2022-08-08 19:49 elong Tag Attached: dialect: h2
2022-08-08 19:53 elong Status assigned => resolved
2022-08-08 19:53 elong Resolution open => fixed
2022-08-08 19:53 elong Fixed in Version => 3.14.1
2022-08-08 20:00 admin Changeset attached => SymmetricDS 3.14 573a8389
2022-08-30 13:04 admin Status resolved => closed