&& (not $is_identity_insert)
&& ($self->_identity_method||'') ne '@@IDENTITY';
- $self = $self->_writer_storage;
- my $guard = $self->txn_scope_guard;
+ ($self, my $guard) = $self->{transaction_depth} == 0 ?
+ ($self->_writer_storage, $self->_writer_storage->txn_scope_guard)
+ :
+ ($self, undef);
+
local $self->{insert_bulk} = 1;
$self->next::method(@_);
}
}
- $guard->commit;
+ $guard->commit if $guard;
+
return;
}
}
}
+sub _dbh_execute_array {
+ my ($self, $sth, $tuple_status, $cb) = @_;
+
+ my $rv = $self->next::method($sth, $tuple_status);
+ $cb->() if $cb;
+
+ return $rv;
+}
+
# Make sure blobs are not bound as placeholders, and return any non-empty ones
# as a hash.
sub _remove_blob_cols {