sub _execute_array {
my ($self, $source, $sth, $bind, $cols, $data, $after_exec_cb) = @_;
+ my $guard = $self->txn_scope_guard unless $self->{transaction_depth} != 0;
+
## This must be an arrayref, else nothing works!
my $tuple_status = [];
);
}
+ $guard->commit if $guard;
+
return $rv;
}
sub _execute_array_empty {
my ($self, $sth, $count) = @_;
+
+ my $guard = $self->txn_scope_guard unless $self->{transaction_depth} != 0;
+
eval {
my $dbh = $self->_get_dbh;
local $dbh->{RaiseError} = 1;
$self->throw_exception($exception) if $exception;
+ $guard->commit if $guard;
+
return $count;
}
&& (not $is_identity_insert)
&& ($self->_identity_method||'') ne '@@IDENTITY';
- ($self, my ($guard)) = do {
- if ($self->{transaction_depth} == 0 && $blob_cols &&
- $dumb_last_insert_id) {
- ($self->_writer_storage, $self->_writer_storage->txn_scope_guard);
- }
- else {
- ($self, undef);
- }
- };
+ $self = $self->_writer_storage;
+ my $guard = $self->txn_scope_guard;
$self->next::method(@_);
}
}
- $guard->commit if $guard;
+ $guard->commit;
return;
}