View Issue Details

IDProjectCategoryView StatusLast Update
0005105SymmetricDSBugpublic2021-11-04 14:58
Reporterelong Assigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.9.9 
Target Version3.12.12Fixed in Version3.12.12 
Summary0005105: Transforms should return old and new values for updates when column is primary key
DescriptionFor transforms that produce a single value, it currently returns an old value for deletes and a new value for inserts and updates. (It's possible that leaving the old value as null on updates was done to help with forcing an update to apply since it looks like a change occurred for that column.) However, when this kind of transform is put on a primary key column, it causes an update with a where clause that binds the old values (which are null). This causes the auto resolver logic to run, where it gets 0 rows updated, tries an insert, gets a PK violation, and removes the row. Instead, the transform should use the single value for both the old and new values when the event is an update and the column is a primary key.
Steps To Reproduce1. create table mytest (id integer primary key, name varchar(10));
2. Put a "constant" column on mytest.id with a value of 1
3. insert into mytest values (1, 'hi'); update mytest set name = 'hello' where id = 1;
Tagstransformation

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.12 ff5b8539

2021-10-19 15:30:38

admin

Details Diff
0005105: Transforms should return old and new values for updates when
column is primary key
Affected Issues
0005105
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/io/data/transform/LookupColumnTransform.java Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/io/data/transform/ParameterColumnTransform.java Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/io/data/transform/VariableColumnTransform.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/BinaryLeftColumnTransform.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/ClarionDateTimeColumnTransform.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/ConstantColumnTransform.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/IsNullTransform.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/LeftColumnTransform.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/MathColumnTransform.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/NewAndOldValue.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/SubstrColumnTransform.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/ValueMapColumnTransform.java Diff File

Issue History

Date Modified Username Field Change
2021-10-19 15:20 elong New Issue
2021-10-19 15:20 elong Status new => assigned
2021-10-19 15:20 elong Assigned To => elong
2021-10-19 15:20 elong Tag Attached: transformation
2021-10-19 15:21 elong Project SymmetricDS Pro => SymmetricDS
2021-10-19 15:31 elong Status assigned => resolved
2021-10-19 15:31 elong Resolution open => fixed
2021-10-19 15:31 elong Fixed in Version => 3.12.12
2021-10-19 16:00 admin Changeset attached => SymmetricDS 3.12 ff5b8539
2021-11-04 14:58 admin Status resolved => closed