Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 32423
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: Nobody in particular
Requestors: damjan [...] mailermailer.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.0.0



Subject: Problem handling prepared transactions
Date: Fri, 18 Jan 2008 11:23:27 -0500
To: bug-DBD-Pg [...] rt.cpan.org
From: Damjan Pelemis <damjan [...] mailermailer.com>
* DBD-Pg-1.49 * perl, v5.8.8 built for amd64-freebsd * FreeBSD 6.1-RELEASE-p1 (also confirmed on Mac OS 10.5.1) Creating a prepared transaction in PostgreSQL 8.1 PREPARE TRANSACTION named_transaction COMMIT PREPARED named_transaction" leaves the driver thinking there is an outstanding transaction Here's a piece of code to reproduce: use DBI; my $dbh = DBI->connect('put your connect string here'); $dbh->begin_work(); my $sth = $dbh->prepare("PREPARE TRANSACTION ?"); $sth->execute('any_name'); $dbh->do("COMMIT PREPARED " . $dbh->quote('any_name')); $dbh->begin_work(); $dbh->disconnect(); --------------- Results in: DBD::Pg::db begin_work failed: Already in a transaction at short_break line 7.
I redid the way we check for transaction status in r10616, which should fix the problem you are having.