about summary refs log tree commit diff
path: root/scoop.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-05-21 15:51:31 -0400
committerJune McEnroe <june@causal.agency>2022-05-21 15:55:53 -0400
commitc300d03c783af49075aabf641450baad552b8159 (patch)
tree7f13fdee8ef00aca60a8ab9e66be2b08f814d6b9 /scoop.c
parentClose database before calling tls_close(3) (diff)
downloadlitterbox-c300d03c783af49075aabf641450baad552b8159.tar.gz
litterbox-c300d03c783af49075aabf641450baad552b8159.zip
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.
Diffstat (limited to '')
-rw-r--r--scoop.c2
1 files changed, 1 insertions, 1 deletions
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");
 	}
a77700a79a8f0859934b900e0c8ad76f2707&follow=1'>Add Maiden, Mother, CroneJune McEnroe 2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe 2022-06-03Set line number on File linesJune McEnroe 2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe