unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] Msgmap: pass ReadOnly DBI flag for non-writable opens
@ 2015-10-02 18:35 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-10-02 18:35 UTC (permalink / raw)
  To: meta

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 8a34e7e..6e9f274 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');
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-02 18:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02 18:35 [PATCH] Msgmap: pass ReadOnly DBI flag for non-writable opens Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).