Re: DBD::Sybase and auto commit
From: Michael Peppler (mpeppler_at_peppler.org)
Date: 07/15/04
- Next message: Thep Sykheo: "Problem of DBI build"
- Previous message: Matthew O. Persico: "Re: DBD::Sybase and auto commit"
- In reply to: Matthew O. Persico: "Re: DBD::Sybase and auto commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: dbi-users@perl.org Date: Thu, 15 Jul 2004 08:32:41 +0200
On Thu, 2004-07-15 at 01:26, Matthew O. Persico wrote:
> On Wed, 14 Jul 2004 08:18:27 +0200, Michael Peppler typed:
> > On Wed, 2004-07-14 at 02:46, Matthew O. Persico wrote:
> >> the $sth at prepare time and used as such at execution time,
> >> regardless of what the $dbh value is set to?
> > The first thing you can do in your stored proc is to use a
> > savepoint -
> > that should fix the immediate problem.
> > Something like:
> > create proc foo
> > ..
> > begin tran
> > save tran foo_tran
> > ..
> > if @@error
> > begin
> > rollback tran foo_tran
> > commit tran
> > return some_error_value
> > end
> > commit tran foo_tran
> > would probably work, and would be sure to rollback only the code in
> > the
> > proc, and not the rest of the transaction.
>
> Hmm. I don't quite understand it, but I'll read the docs and then try it.
It's a standard way of handling nested transactions, so that a
commit/rollback only goes to the previous savepoint, not to the
outermost transaction.
> > That being said, DBD::Sybase supports two AutoCommit "off" modes.
> > One
> > using explicit transactions, and the other using "chained" mode. In
> > the
> > "chained" mode we let the server start the implicit transaction as
> > needed, and that's the mode that *should* be the default for
> > DBD::Sybase
> > (but hasn't been up to now, for various reasons). I will probably
> > change
> > that in an upcoming release.
>
> Wow, that's going to require a boat-load of testing, isn't it? Will
> there be a way to change the default at installation time back to the
> way it was?
Yes, although I don't think that it should make any *real* difference.
Michael
-- Michael Peppler Data Migrations, Inc. mpeppler@peppler.org http://www.peppler.org/ Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or long term contract positions - http://www.peppler.org/resume.html
- Next message: Thep Sykheo: "Problem of DBI build"
- Previous message: Matthew O. Persico: "Re: DBD::Sybase and auto commit"
- In reply to: Matthew O. Persico: "Re: DBD::Sybase and auto commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|