]> Sergey Matveev's repositories - public-inbox.git/commitdiff
Msgmap: pass ReadOnly DBI flag for non-writable opens
authorEric Wong <e@80x24.org>
Fri, 2 Oct 2015 18:35:12 +0000 (18:35 +0000)
committerEric Wong <e@80x24.org>
Fri, 2 Oct 2015 20:34:10 +0000 (20:34 +0000)
This doesn't seem to do anything on my older system, but maybe it
will in newer or future versions of DBD::SQLite.  Anyways it can
be helpful for documentation purposes, too.

lib/PublicInbox/Msgmap.pm

index 8a34e7e0c713a4036cd156de22795a525320e5d7..6e9f27433c2eacf495a17b9150099800a40f3914 100644 (file)
@@ -19,6 +19,7 @@ sub new {
                AutoCommit => 1,
                RaiseError => 1,
                PrintError => 0,
+               ReadOnly => !$writable,
                sqlite_use_immediate_transaction => 1,
        });
        $dbh->do('PRAGMA case_sensitive_like = ON');