From: naoki i. <am...@us...> - 2008-02-07 15:36:32
|
Update of /cvsroot/popfile/engine/POPFile In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11320/POPFile Modified Files: Tag: b0_22_2 History.pm Log Message: Fixed a bug that causes a few warnings during the corpus upgrade process. Index: History.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/History.pm,v retrieving revision 1.29.4.2 retrieving revision 1.29.4.3 diff -C2 -d -r1.29.4.2 -r1.29.4.3 *** History.pm 16 Oct 2007 17:19:52 -0000 1.29.4.2 --- History.pm 7 Feb 2008 15:36:35 -0000 1.29.4.3 *************** *** 278,281 **** --- 278,283 ---- my $r; + my $in_transaction = ! ( $self->db__()->{AutoCommit} ); + $self->log_( 2, "already in a transaction." ) if ($in_transaction); while (1) { *************** *** 285,289 **** # Avoid another POPFile process using the same committed id ! $self->db__()->begin_work; # TODO Replace the hardcoded user ID 1 with the looked up --- 287,291 ---- # Avoid another POPFile process using the same committed id ! $self->db__()->begin_work unless ($in_transaction); # TODO Replace the hardcoded user ID 1 with the looked up *************** *** 294,298 **** if ( defined( $test ) ) { ! $self->db__()->commit; next; } --- 296,300 ---- if ( defined( $test ) ) { ! $self->db__()->commit unless ($in_transaction); next; } *************** *** 310,314 **** my $result = $self->db__()->selectrow_arrayref( "select id from history where committed = $r limit 1;"); ! $self->db__()->commit; my $slot = $result->[0]; --- 312,316 ---- my $result = $self->db__()->selectrow_arrayref( "select id from history where committed = $r limit 1;"); ! $self->db__()->commit unless ($in_transaction); my $slot = $result->[0]; |