[libchamplain] Remove deprecated count_changes pragma and perform database vacuum on demand



commit 55826b81be9bd911650f246f0d15e29e0851ef01
Author: Jiří Techet <techet gmail com>
Date:   Tue Aug 6 21:41:42 2013 +0200

    Remove deprecated count_changes pragma and perform database vacuum on demand

 champlain/champlain-file-cache.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/champlain/champlain-file-cache.c b/champlain/champlain-file-cache.c
index 963cfa0..6a4cb9e 100644
--- a/champlain/champlain-file-cache.c
+++ b/champlain/champlain-file-cache.c
@@ -223,7 +223,7 @@ init_cache (ChamplainFileCache *file_cache)
 
   sqlite3_exec (priv->db,
       "PRAGMA synchronous=OFF;"
-      "PRAGMA count_changes=OFF;",
+      "PRAGMA auto_vacuum=INCREMENTAL;",
       NULL, NULL, &error_msg);
   if (error_msg != NULL)
     {
@@ -1014,4 +1014,6 @@ champlain_file_cache_purge (ChamplainFileCache *file_cache)
       sqlite3_free (error);
     }
   sqlite3_free (query);
+  
+  sqlite3_exec (priv->db, "PRAGMA incremental_vacuum;", NULL, NULL, &error);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]