diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 990b876ef..bc1c4601b 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -622,7 +622,9 @@ sub new $xCAT::Schema::tabspec{$self->{tabname}}, $xcatcfg); $self->{dbh}->do($str); - $self->{dbh}->commit; + if (!$self->{dbh}->{AutoCommit}) { + $self->{dbh}->commit; + } } else { return undef; } }