From: Rafael Kitover Date: Sun, 7 Mar 2010 11:08:00 +0000 (+0000) Subject: remove unnecessary transaction_depth check in DBI::insert_bulk X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3b2c43128a5514ea68df150942c1038ba8e915d6;p=dbsrgits%2FDBIx-Class-Historic.git remove unnecessary transaction_depth check in DBI::insert_bulk --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 221fa6e..a9a765c 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1472,7 +1472,7 @@ sub insert_bulk { # neither _execute_array, nor _execute_inserts_with_no_binds are # atomic (even if _execute _array is a single call). Thus a safety # scope guard - my $guard = $self->txn_scope_guard unless $self->{transaction_depth} != 0; + my $guard = $self->txn_scope_guard; $self->_query_start( $sql, ['__BULK__'] ); my $sth = $self->sth($sql); @@ -1489,8 +1489,7 @@ sub insert_bulk { $self->_query_end( $sql, ['__BULK__'] ); - - $guard->commit if $guard; + $guard->commit; return (wantarray ? ($rv, $sth, @bind) : $rv); }