X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FACCESS.pm;h=35b076e7daaf13ebaab98c102eea22d5c4ed6742;hb=90d7422fc60a3bad71cc67dc20106ef68046664e;hp=723b856556284da5761cc4f68f61d5c557a2ec69;hpb=eb7aa96091132ffd9f6256d2ff3d341102b60003;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/ACCESS.pm b/lib/DBIx/Class/Storage/DBI/ACCESS.pm index 723b856..35b076e 100644 --- a/lib/DBIx/Class/Storage/DBI/ACCESS.pm +++ b/lib/DBIx/Class/Storage/DBI/ACCESS.pm @@ -104,31 +104,23 @@ sub bind_attribute_by_data_type { # Unfortunately DBI does not support nested transactions. # WARNING: this code uses the undocumented 'BegunWork' DBI attribute. -sub _svp_begin { +sub _exec_svp_begin { my ($self, $name) = @_; - $self->throw_exception( - 'cannot BEGIN a nested transaction on a disconnected handle' - ) unless $self->_dbh; - local $self->_dbh->{AutoCommit} = 1; local $self->_dbh->{BegunWork} = 0; - $self->_dbh_begin_work; + $self->_exec_txn_begin; } # A new nested transaction on the same level releases the previous one. -sub _svp_release { 1 } +sub _exec_svp_release { 1 } -sub _svp_rollback { +sub _exec_svp_rollback { my ($self, $name) = @_; - $self->throw_exception( - 'cannot ROLLBACK a nested transaction on a disconnected handle' - ) unless $self->_dbh; - local $self->_dbh->{AutoCommit} = 0; local $self->_dbh->{BegunWork} = 1; - $self->_dbh_rollback; + $self->_exec_txn_rollback; } 1;