PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Tim Bunce <Tim dot Bunce at ig dot co dot uk>
Subject: Re: DBD::Sybase 0.17 and AutoCommit == 0
Date: Jun 2 1999 12:08PM

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.
> 
> However, this change, as I've been informed, prevents users from
> running stored procs (or other code) that itself issues a BEGIN TRAN
> , so nested transactions are not possible.
> 
> Is this behaviour acceptable, or should I revert to the old method of
> issuing an explicit BEGIN TRAN?
> 
> Comments welcome - I don't use AutoCommit off myself...

What were the down-sides, if any, to the previous approach?

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 });

Tim.