View Issue Details

IDProjectCategoryView StatusLast Update
0004840SymmetricDSBugpublic2021-02-25 21:33
Reporterpmarzullo Assigned Topmarzullo  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.12.6 
Target Version3.12.7Fixed in Version3.12.7 
Summary0004840: Sybase ASE primary key update should create update event when only one record is updated
DescriptionWhen Sybase ASE primary key update occurs, we capture a delete event and an insert event.

This breaks when there are foreign key constraints that refer to this table, referring to non-primary key columns.
This case is rare.
It breaks because we execute a delete on the target, which will cause the foreign key constraint to fail.

The functionality of a primary key update on Sybase ASE should change such that if only one record is updated when a primary key update occurs, then create an update event, joining the "insert" result set and the "delete" result set with a "ON 1=1". This will link the delete record with the insert record inside the trigger together, successfully linking the two records together.
Steps To Reproduce1. Create table with a primary key and another column.
2. Create a unique index on the other column (required in order to refer to this column with a foreign key constraint).
3. Create another table that has a column that refers to the other column on table 1 with a foreign key constraint.
4. Insert a record into table 1.
5. Insert a record into table 2 with a value in the column referring to the record in table 1.
6. Update the primary key value in table 1.

The delete on the target should fail.
Tagsdialect: sybase

Relationships

related to 0004612 closedpmarzullo SQL Server primary key update should create update event when only one record is updated 

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.12 dab2c2f0

2021-02-18 13:32:58

pmarzullo

Details Diff
0004840: Sybase ASE primary key update should create update event when
only one record is updated
Affected Issues
0004840
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/ase/AseTriggerTemplate.java Diff File

Issue History

Date Modified Username Field Change
2021-02-18 13:28 pmarzullo New Issue
2021-02-18 13:28 pmarzullo Status new => assigned
2021-02-18 13:28 pmarzullo Assigned To => pmarzullo
2021-02-18 13:28 pmarzullo Tag Attached: dialect: sybase
2021-02-18 13:28 pmarzullo Relationship added related to 0004612
2021-02-18 13:33 pmarzullo Status assigned => resolved
2021-02-18 13:33 pmarzullo Resolution open => fixed
2021-02-18 13:33 pmarzullo Fixed in Version => 3.12.7
2021-02-18 13:34 pmarzullo Category Improvement => Bug
2021-02-18 14:00 pmarzullo Changeset attached => SymmetricDS 3.12 dab2c2f0
2021-02-25 21:33 admin Status resolved => closed