View Issue Details

IDProjectCategoryView StatusLast Update
0001462SymmetricDSBugpublic2014-02-03 01:53
Reporterelong Assigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.5.10 
Target Version3.5.11Fixed in Version3.5.11 
Summary0001462: Stored procedure with NOCOUNT is rolled back
DescriptionA task or store procedure using SET NOCOUNT ON cannot commit its data when updating a table with a SymmetricDS trigger. The following error occurs:

"A trigger returned a resultset and/or was running with SET NOCOUNT OFF while another outstanding result set was active.".

"Uncommittable transaction is detected at the end of the batch. The transaction is rolled back."

"The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction."

The SymmetricDS trigger begins with SET NOCOUNT ON to prevent the affected row counts from returning, which is an accepted practice for performance. At the end of the trigger, it sets the NOCOUNT OFF, but this may not have been the state of the setting before the trigger was called.
Steps To Reproduce1. Use a task or stored procedure with SET NOCOUNT ON
2. Setup SymmetricDS trigger on a table
3. Call the stored procedure and cause it to update the table
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: master 7eea4093

2013-11-13 15:45:57

erilong

Details Diff
0001462: preserve the caller's nocount option Affected Issues
0001462
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/ase/AseTriggerTemplate.java Diff File
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/mssql/MsSqlTriggerTemplate.java Diff File
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/mssql2000/MsSql2000TriggerTemplate.java Diff File

SymmetricDS: master 9fd35ec6

2013-11-13 16:54:09

erilong

Details Diff
0001462: preserve the caller's nocount option; must assign separate from declaration Affected Issues
0001462
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/ase/AseTriggerTemplate.java Diff File
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/mssql/MsSqlTriggerTemplate.java Diff File
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/mssql2000/MsSql2000TriggerTemplate.java Diff File

SymmetricDS: master 5084dee3

2013-11-14 07:34:21

erilong

Details Diff
0001462: preserve the caller's nocount option; backing this change out from Sybase for now Affected Issues
0001462
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/ase/AseTriggerTemplate.java Diff File

Issue History

Date Modified Username Field Change
2013-11-13 14:43 elong New Issue
2013-11-13 14:43 elong Status new => assigned
2013-11-13 14:43 elong Assigned To => elong
2013-11-14 15:22 elong Status assigned => resolved
2013-11-14 15:22 elong Fixed in Version => 3.5.11
2013-11-14 15:22 elong Resolution open => fixed
2013-11-14 16:00 chenson Status resolved => closed
2014-02-03 01:53 Changeset attached => SymmetricDS trunk r7765
2014-02-03 01:53 Changeset attached => SymmetricDS trunk r7766
2014-02-03 01:53 Changeset attached => SymmetricDS trunk r7769
2015-07-31 01:49 Changeset attached => SymmetricDS master 5084dee3
2015-07-31 01:49 Changeset attached => SymmetricDS master 9fd35ec6
2015-07-31 01:49 Changeset attached => SymmetricDS master 7eea4093