[Bps-public-commit] r17273 - Prophet/branches/sqlite/lib/Prophet/Replica

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Dec 17 03:09:08 EST 2008


Author: sunnavy
Date: Wed Dec 17 03:09:08 2008
New Revision: 17273

Modified:
   Prophet/branches/sqlite/lib/Prophet/Replica/sqlite.pm

Log:
make autocommit default to be true, only no auto commit betten begin_edit and commit_edit

Modified: Prophet/branches/sqlite/lib/Prophet/Replica/sqlite.pm
==============================================================================
--- Prophet/branches/sqlite/lib/Prophet/Replica/sqlite.pm	(original)
+++ Prophet/branches/sqlite/lib/Prophet/Replica/sqlite.pm	Wed Dec 17 03:09:08 2008
@@ -14,7 +14,7 @@
     lazy => 1,
     default => sub {
         my $self = shift;
-        DBI->connect( "dbi:SQLite:" . $self->db_file , undef, undef, {RaiseError =>1, AutoCommit => 0});
+        DBI->connect( "dbi:SQLite:" . $self->db_file , undef, undef, {RaiseError =>1, AutoCommit => 1 });
      }
     );
 
@@ -269,7 +269,6 @@
     $self->set_replica_version(1);
     $self->resolution_db_handle->initialize( db_uuid => $args{resdb_uuid} ) if !$self->is_resdb;
     $self->after_initialize->($self);
-    $self->dbh->commit;
 }
 
 sub latest_sequence_no {
@@ -474,6 +473,7 @@
     
     $self->current_edit($changeset);
     $self->current_edit_records( [] );
+    $self->dbh->begin_work;
 
 }
 



More information about the Bps-public-commit mailing list