[Bast-commits] r8933 - DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Sun Mar 7 11:08:00 GMT 2010


Author: caelum
Date: 2010-03-07 11:08:00 +0000 (Sun, 07 Mar 2010)
New Revision: 8933

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
Log:
remove unnecessary transaction_depth check in DBI::insert_bulk

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm	2010-03-07 11:02:01 UTC (rev 8932)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm	2010-03-07 11:08:00 UTC (rev 8933)
@@ -1472,7 +1472,7 @@
   # 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,9 +1489,8 @@
 
   $self->_query_end( $sql, ['__BULK__'] );
 
+  $guard->commit;
 
-  $guard->commit if $guard;
-
   return (wantarray ? ($rv, $sth, @bind) : $rv);
 }
 




More information about the Bast-commits mailing list