--- trunk/lib/WebPAC/Output/DBI.pm 2010/10/16 17:38:47 1343 +++ trunk/lib/WebPAC/Output/DBI.pm 2010/10/16 17:40:56 1344 @@ -14,6 +14,8 @@ schema table + + no_transaction )); use Data::Dump qw/dump/; @@ -42,7 +44,7 @@ $self->{_dbh} = DBI->connect( $self->dsn, $self->user, $self->passwd, { RaiseError => 1 } ); - $self->{_dbh}->begin_work; + $self->{_dbh}->begin_work unless $self->no_transaction; if ( -e $self->schema ) { foreach my $sql ( split(/;/, scalar read_file( $self->schema )) ) { @@ -128,9 +130,10 @@ $log->info('finish'); - $self->{_dbh}->commit; - - $log->info('commit done'); + unless ( $self->no_transaction ) { + $self->{_dbh}->commit; + $log->info('commit done'); + } return 1; }