View Issue Details

IDProjectCategoryView StatusLast Update
0004980SymmetricDSBugpublic2021-05-28 20:40
Reporterelong Assigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.12.0 
Target Version3.12.10Fixed in Version3.12.10 
Summary0004980: MySQL 8 CHAR data type needs spaces right trimmed
DescriptionBefore MySQL 8, an insert into a CHAR column would receive right trimming of spaces for storage, and any value used in WHERE clauses would also receive the same right trimming of spaces. Starting in MySQL 8, the behavior for WHERE clauses was changed to preserve the spaces on the values. Now on MySQL 8, it causes errors for SymmetricDS if it queries, updates, or deletes a row using a CHAR value with space padding on the right.

2021-05-05 22:12:25,687 INFO [server] [DefaultDatabaseWriter] [server-dataloader-1] Failed to process insert event in batch server-657713 on channel 'default'.
 StackTraceKey.init [ConflictException:427500784] org.jumpmind.symmetric.io.data.writer.ConflictException: Detected conflict while executing INSERT on server.mytable. The primary key data was: {id=ABC record_num=1, series_num=299 }. Failed to fallback. The original error message was: Duplicate entry 'ABC-1-299' for key 'mytable.PRIMARY'
    at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriterConflictResolver.performFallbackToUpdate(AbstractDatabaseWriterConflictResolver.java:368)
    at org.jumpmind.symmetric.io.data.writer.DefaultTransformWriterConflictResolver.performFallbackToUpdate(DefaultTransformWriterConflictResolver.java:110)
    at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriterConflictResolver.performChainedFallbackForInsert(AbstractDatabaseWriterConflictResolver.java:207)
    at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriterConflictResolver.needsResolved(AbstractDatabaseWriterConflictResolver.java:54)
    at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:216)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
    at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:84)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
    at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:202)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:212)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:178)
    at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:124)
    at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1091)
    at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1067)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Tagsdialect: mysql/mariadb

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.12 dc61967c

2021-05-06 20:24:38

admin

Details Diff
0004980: MySQL 8 char data type space right trimming Affected Issues
0004980
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDatabasePlatform.java Diff File

Issue History

Date Modified Username Field Change
2021-05-06 20:23 elong New Issue
2021-05-06 20:23 elong Status new => assigned
2021-05-06 20:23 elong Assigned To => elong
2021-05-06 20:23 elong Tag Attached: dialect: mysql/mariadb
2021-05-06 20:35 elong Status assigned => resolved
2021-05-06 20:35 elong Resolution open => fixed
2021-05-06 20:35 elong Fixed in Version => 3.12.10
2021-05-06 20:35 elong Summary MySQL 8 char data type space right trimming => MySQL 8 CHAR data type needs spaces right trimmed
2021-05-06 20:35 elong Description Updated View Revisions
2021-05-06 21:00 admin Changeset attached => SymmetricDS 3.12 dc61967c
2021-05-28 20:40 admin Status resolved => closed