View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004906 | SymmetricDS | Bug | public | 2021-03-19 15:48 | 2021-03-30 19:46 |
Reporter | pmarzullo | Assigned To | pmarzullo | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.12.7 | ||||
Target Version | 3.12.8 | Fixed in Version | 3.12.8 | ||
Summary | 0004906: Sybase ASE: update trigger needs to set nocount on on very first statement | ||||
Description | Sybase 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 Reproduce | 1. 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. | ||||
Tags | dialect: sybase, trigger | ||||
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 |