? 1
: 0;
- if (not $is_identity_insert) {
- my ($identity_col) = grep $source->column_info($_)->{is_auto_increment},
- $source->columns;
+ my $identity_col = List::Util::first {
+ $source->column_info($_)->{is_auto_increment}
+ } $source->columns;
+
+ if ((not $is_identity_insert) && $identity_col) {
my $dbh = $self->_get_dbh;
my $table_name = $source->from;
$table_name = $$table_name if ref $table_name;