|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: DBD::Sybase 0.17 and AutoCommit == 0
Date: Jun 2 1999 2:33PM
Tim Bunce writes:
> On Tue, Jun 01, 1999 at 04:31:44PM -0700, Michael Peppler wrote:
> > *** From dbi-dev -- To unsubscribe, see the end of this message. ***
> >
> > Starting with DBD::Sybase 0.15 I've changed the way I handle
> > AutoCommit off mode.
> > In previous versions, DBD::Sybase would issue a BEGIN TRAN
> > if needed, and $dbh->commit would issue a COMMIT TRAN .
> > The current version uses the SET CHAINED option. When the CHAINED
> > option is on the Sybase server automatically acts as if a BEGIN TRAN
> > was issued, and will only effectively commit the changes once a COMMIT
> > is sent.
>
> What were the down-sides, if any, to the previous approach?
DDL statements (such as creating a temporary table) which can be
hidden in stored procedure can't be used inside an explicit
transaction, unless one sets the ddl_in_transactions option to true
(because this causes long lived locks on system tables, not a good
thing).
When using the CHAINED TRANSACTIONS option this feature works (but at
the expense of nested transactions, rats!)
So it looks like 6 of one or a half-dozen of the other...
>
> Perhaps you could make it configurable and default it to off
> (for maximum compatibility). Those who would benefit from it can
> enable it if they choose:
>
> DBI->connect(..., { syb_chained_txn => 1 });
Yeah - look for this in 0.18.
Michael
|