about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-13T18·33-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-13T18·33-0400
commite6e495649cc1f324cd0a66cfaf3c4bdf21522e63 (patch)
tree48730d41c13b4ac7dbfada7203f0d542aefe02f5 /src/libstore/local-store.cc
parent2923b55f9d67bda340053a27e08f7bcddc025f7c (diff)
Vacuum the SQLite DB after running the garbage collector
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index bd63ce55d095..793ec89d918b 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -1703,4 +1703,11 @@ void LocalStore::upgradeStore6()
 }
 
 
+void LocalStore::vacuumDB()
+{
+    if (sqlite3_exec(db, "vacuum;", 0, 0, 0) != SQLITE_OK)
+        throwSQLiteError(db, "vacuuming SQLite database");
+}
+
+
 }