From: Brandon L. Black Date: Thu, 10 May 2007 21:11:04 +0000 (+0000) Subject: do not try to silently handle disconnects when in a manual txn_begin/txn_end transaction X-Git-Tag: v0.08010~150^2~77 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cb19f4ddad12c829cbd7f8b5cd51615191d24fdc;p=dbsrgits%2FDBIx-Class.git do not try to silently handle disconnects when in a manual txn_begin/txn_end transaction --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index d0289c9..5cc795f 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -506,7 +506,9 @@ sub dbh_do { ref $coderef eq 'CODE' or $self->throw_exception ('$coderef must be a CODE reference'); - return $coderef->($self, $self->_dbh, @_) if $self->{_in_dbh_do}; + return $coderef->($self, $self->_dbh, @_) if $self->{_in_dbh_do} + || $self->{transaction_depth}; + local $self->{_in_dbh_do} = 1; my @result;