about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-12-28 18:32:41 -0500
committerJune McEnroe <june@causal.agency>2019-12-28 18:32:41 -0500
commit121dd0b17e5c6e5d6d43d116345924206bc69fd5 (patch)
tree2c692154273b298bb69be609b9287506cd312401
parentCall tls_close and dbClose in atexit (diff)
downloadlitterbox-121dd0b17e5c6e5d6d43d116345924206bc69fd5.tar.gz
litterbox-121dd0b17e5c6e5d6d43d116345924206bc69fd5.zip
Run PRAGMA optimize in dbClose
Diffstat (limited to '')
-rw-r--r--database.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/database.h b/database.h
index 810ce94..0494851 100644
--- a/database.h
+++ b/database.h
@@ -132,6 +132,7 @@ static inline void dbClose(void) {
 		free(persist);
 		persist = prev;
 	}
+	dbExec(SQL(PRAGMA optimize;));
 	sqlite3_close(db);
 }