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: "Avis, Ed" <avised at kbcfp dot com>
Subject: 'Cannot rollback' on disconnect
Date: Jan 9 2004 5:53PM

From my program I'm seeing a strange error when disconnecting a
DBD::Sybase database handle.

DBD::Sybase::db disconnect failed: Server message number=6401 severity=16 state=1 line=2 server=MY_SERVERtext=Cannot rollback DBI827bdc8 - no transaction or savepoint of that name found.
DBD::Sybase::db disconnect failed: Server message number=6401 severity=16 state=1 line=2 server=MY_SERVERtext=Cannot rollback DBI827bdc8 - no transaction or savepoint of that name found.

But this happens only for one server, and only with particular queries.
My program looks like

use warnings;
use strict;
use DBI;
my $dbh =
    DBI->connect('dbi:Sybase:server=MY_SERVER;database=my_database',
                 'user', 'password',
                 { RaiseError => 1, AutoCommit => 0 });
my $sql = <selectall_arrayref($sql);
disconnect $dbh;

The strange thing is that if I change the SQL to remove the join or the
group by, I no longer see the errors.  This is with DBI-1.30,
DBD::Sybase-1.02.2 (though older versions are also affected) on Red Hat
Linux 8.0.

-- 
Ed Avis