View Issue Details

IDProjectCategoryView StatusLast Update
0004906SymmetricDSBugpublic2021-03-30 19:46
Reporterpmarzullo Assigned Topmarzullo  
Status closedResolutionfixed 
Product Version3.12.7 
Target Version3.12.8Fixed in Version3.12.8 
Summary0004906: Sybase ASE: update trigger needs to set nocount on on very first statement
DescriptionSybase ASE trigger was modified to implement a functionality such that when only one record was updated when a primary key column was updated, the statement "set nocount on" was moved to the third statement in the trigger.

This broke the ability for ASE to return the number of rows updated by the statement correctly, and instead was returning a value of 0 for the number of rows updated, even when more than 0 rows were really updated.

So, the "set nocount on" must be executed first, and the way to count the number of rows updated when the primary key column is updated is changed to not use the @@ROWCOUNT variable, but instead use the number of rows in the "inserted" table that is provided in the trigger definition (select count(*) from inserted).
Steps To Reproduce1. Set up synch to a Sybase ASE database as a client database.
2. Stop the SymmetricDS instance.
3. Delete the rows from the Sybase ASE database tables sym_node_host, sym_node_identity, sym_node_security, and sym_node.
4. Start up the SymmetricDS instance.
5. The client engine will fail to start because it tries to insert a sym_channel record that is already there, because the update statement that successfully updated a row returned a value of 0 for the number of rows updated.
Tagsdialect: sybase, trigger


There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.12 11e57712

2021-03-19 15:49:23


Details Diff
0004906: Sybase ASE: update trigger needs to set nocount on on very
first statement
Affected Issues
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/ase/ Diff File

Issue History

Date Modified Username Field Change
2021-03-19 15:48 pmarzullo New Issue
2021-03-19 15:48 pmarzullo Status new => assigned
2021-03-19 15:48 pmarzullo Assigned To => pmarzullo
2021-03-19 15:48 pmarzullo Tag Attached: dialect: sybase
2021-03-19 15:48 pmarzullo Tag Attached: trigger
2021-03-19 15:59 pmarzullo Status assigned => resolved
2021-03-19 15:59 pmarzullo Resolution open => fixed
2021-03-19 15:59 pmarzullo Fixed in Version => 3.12.8
2021-03-19 16:00 pmarzullo Changeset attached => SymmetricDS 3.12 11e57712
2021-03-30 19:46 admin Status resolved => closed