From 00d5f18726f9ad435fc44a527ba486dcbeab9f81 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 2 Oct 2015 18:35:12 +0000 Subject: Msgmap: pass ReadOnly DBI flag for non-writable opens 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm index 8a34e7e0..6e9f2743 100644 --- a/lib/PublicInbox/Msgmap.pm +++ b/lib/PublicInbox/Msgmap.pm @@ -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'); -- cgit v1.2.3-24-ge0c7