]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/OverIdx.pm
over: use only supported and safe SQLite APIs
[public-inbox.git] / lib / PublicInbox / OverIdx.pm
index 0e43aabc044f61d0f16153b70f554cbc11159fc9..5c20f1f0c2170c4dae4a3417a8c77ad73ee95010 100644 (file)
@@ -14,21 +14,12 @@ use DBI qw(:sql_types); # SQL_BLOB
 sub dbh_new {
        my ($self) = @_;
        my $dbh = $self->SUPER::dbh_new;
-       $dbh->do('PRAGMA synchronous = OFF'); # commit_fsync instead
        $dbh->do('PRAGMA journal_mode = TRUNCATE');
        $dbh->do('PRAGMA cache_size = 80000');
        create_tables($dbh);
        $dbh;
 }
 
-sub commit_fsync {
-       my $fn = $_[0]->{filename};
-       if (open my $fh, '+<', $fn) {
-               $fh->sync;
-               close $fh;
-       }
-}
-
 sub get_counter ($$) {
        my ($dbh, $key) = @_;
        my $sth = $dbh->prepare_cached(<<'', undef, 1);