FreeTDS / freetds

Official FreeTDS repository
http://www.freetds.org/
GNU General Public License v2.0
463 stars 161 forks source link

20018 SQL Anywhere Error -267: COMMIT/ROLLBACK not allowed within atomic operation #380

Closed AlunR closed 2 years ago

AlunR commented 3 years ago

When making a CALL to the SQLAnywhere DB call

call mydatabase.ABCfunction(iforenames='Alun',isurname='Rowe',iemailaddress='alun@example.com',isite='ABC1231DDFFEERR') I am receiving the following error:

General error: 20018 SQL Anywhere Error -267: COMMIT/ROLLBACK not allowed within atomic operation

Select statements against the same database work fine as do read only calls.

To Reproduce

Using TSQL: call mydatabase.ABCfunction(iforenames='Alun',isurname='Rowe',iemailaddress='alun@example.com',isite='ABC1231DDFFEERR')

results in

20018 SQL Anywhere Error -267: COMMIT/ROLLBACK not allowed within atomic operation

Additional context

SQL Anywhere v16

Gut feeling is It appears FreeTDS is wrapping the call in a transaction which then causes the server to refuse the COMMIT as that method is outside the scope of a transaction

fziglio commented 3 years ago

hard to reproduce if you don't have SQL Anywhere or ABCfunction. But there are tests in FreeTDS dealing with transactions and they all are working so I would suspect some different behaviour of SQL Anywhere or some different settings. Maybe SQL Anywhere is running all "calls" as atomic operations?

freddy77 commented 2 years ago

No reply for more than a year, closing