freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Petr ZEMAN <petrz AT aswsyst.cz>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] begin atomic in procedures
- Date: Wed, 23 Nov 2005 17:09:43 +0100
Good afternoon.
I have a problem with atomic statement in sybase ASA and FreeTDS. When it's
used in procedures called from PHP by freetds, it ends with "Error -267:
COMMIT/ROLLBACK not allowed within atomic operation"
I use:
Adaptive Server Anywhere Network Server Version 9.0.2.3182
FreeTDS 0.62.3 (I tried 0.63 too)
PHP 5.0.4-pl3-gentoo:
Sybase_CT Support => enabled
Active Persistent Links => 0
Active Links => 0
Min server severity => 10
Min client severity => 10
Application Name => PHP 5.0.4-pl3-gentoo
Deadlock retry count => -1
Directive => Local Value => Master Value
sybct.allow_persistent => On => On
sybct.deadlock_retry_count => Unlimited => Unlimited
sybct.hostname => no value => no value
sybct.login_timeout => -1 => -1
sybct.max_links => Unlimited => Unlimited
sybct.max_persistent => Unlimited => Unlimited
sybct.min_client_severity => 10 => 10
sybct.min_server_severity => 10 => 10
Linux 2.6.13-gentoo-r5 #1 SMP Wed Nov 2 10:12:28 CET 2005 i686 Intel(R)
Celeron(R) CPU 2.40GHz GenuineIntel GNU/Linux
Replication of problem:
Create new empty DB.
Create table 'test' with one integer colum 'id'.
Add any row to table 'test'
Create procedure test:
CREATE PROCEDURE test()
BEGIN
begin atomic
message 'Entered Inner';
update test set id=id+1;
exception
when others then
message 'Error INNER', @@error,' text: ', errormsg();
message 'Leaving Inner';
end;
END
When I call test() from sybase interactive sql, all is ok.
When I call it from php via freetds, ends with:
Error -267: COMMIT/ROLLBACK not allowed within atomic operation
freetds.conf:
[global]
tds version = 5.0
dump file = /tmp/freetds.log
debug level = 1
text size = 64512
[TESTDB]
host = localhost
port = 2638
client charset = UTF-8
tds version = 5.0
As DB layer I use PEAR:DB.
Before call of test() I only set:
SET TEMPORARY OPTION CONNECTION_AUTHENTICATION =
'Company=...;Application=...;Signature=...'
SET TEMPORARY OPTION ON_TSQL_ERROR = 'STOP'
When I remove 'atomic' from procedure test(), all is OK.
Thank you in advance for any help
--
Regards
Petr ZEMAN
Attachment:
pgpBFBO_9XW0f.pgp
Description: PGP signature
-
[freetds] begin atomic in procedures,
Petr ZEMAN, 11/23/2005
- <Possible follow-up(s)>
- Re: [freetds] begin atomic in procedures, Pickett, David, 11/23/2005
- Re: [freetds] begin atomic in procedures, Petr ZEMAN, 11/24/2005
- Re: [freetds] begin atomic in procedures, Pickett, David, 11/25/2005
Archive powered by MHonArc 2.6.24.