From c300d03c783af49075aabf641450baad552b8159 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sat, 21 May 2022 15:51:31 -0400 Subject: Open database readonly from scoop I originally changed it to RW so that PRAGMA optimize could run, but since that relies on usage pattern information for that database connection, I don't think it makes sense to run it in scoop anyway, where only one query is run. Move it to litterbox only. --- scoop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scoop.c') diff --git a/scoop.c b/scoop.c index 031e4e2..e3c3d24 100644 --- a/scoop.c +++ b/scoop.c @@ -529,7 +529,7 @@ int main(int argc, char *argv[]) { binds[n++] = Bind(":limit", limit, 0); } - dbFind(path, SQLITE_OPEN_READWRITE); + dbFind(path, SQLITE_OPEN_READONLY); if (dbVersion() != DatabaseVersion) { errx(EX_CONFIG, "database out of date; migrate with litterbox -m"); } -- cgit 1.4.1