gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r11411 - gnunet/src/datastore


From: gnunet
Subject: [GNUnet-SVN] r11411 - gnunet/src/datastore
Date: Tue, 18 May 2010 09:18:27 +0200

Author: grothoff
Date: 2010-05-18 09:18:27 +0200 (Tue, 18 May 2010)
New Revision: 11411

Modified:
   gnunet/src/datastore/plugin_datastore_sqlite.c
Log:
use v2

Modified: gnunet/src/datastore/plugin_datastore_sqlite.c
===================================================================
--- gnunet/src/datastore/plugin_datastore_sqlite.c      2010-05-18 07:05:20 UTC 
(rev 11410)
+++ gnunet/src/datastore/plugin_datastore_sqlite.c      2010-05-18 07:18:27 UTC 
(rev 11411)
@@ -180,9 +180,9 @@
             sqlite3_stmt ** ppStmt)
 {
   char *dummy;
-  return sqlite3_prepare (dbh,
-                          zSql,
-                          strlen (zSql), ppStmt, (const char **) &dummy);
+  return sqlite3_prepare_v2 (dbh,
+                            zSql,
+                            strlen (zSql), ppStmt, (const char **) &dummy);
 }
 
 
@@ -776,7 +776,7 @@
       return GNUNET_SYSERR;
     }
   n = sqlite3_step (stmt);
-  if (n != SQLITE_DONE)
+  if (n != SQLITE_DONE) 
     {
       if (n == SQLITE_BUSY)
         {
@@ -1065,7 +1065,7 @@
     {
       LOG_SQLITE (plugin, NULL,
                   GNUNET_ERROR_TYPE_ERROR |
-                  GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare");
+                  GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare_v2");
       iter (iter_cls, NULL, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 
0);
       return;
     }
@@ -1073,7 +1073,7 @@
     {
       LOG_SQLITE (plugin, NULL,
                   GNUNET_ERROR_TYPE_ERROR |
-                  GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare");
+                  GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare_v2");
       sqlite3_finalize (stmt_1);
       iter (iter_cls, NULL, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 
0);
       return;
@@ -1315,7 +1315,7 @@
     {
       LOG_SQLITE (plugin, NULL,
                   GNUNET_ERROR_TYPE_ERROR |
-                  GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare");
+                  GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare_v2");
       iter (iter_cls, NULL, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 
0);
       return;
     }
@@ -1619,12 +1619,12 @@
   if (plugin->stats_worked == GNUNET_NO)
     {
       CHECK (SQLITE_OK ==
-            sq_prepare (plugin->dbh,
-                        "VACUUM;",
-                        &stmt));
-      sqlite3_step (stmt);
-      sqlite3_finalize (stmt);
+            sqlite3_exec (plugin->dbh,
+                          "VACUUM", NULL, NULL, ENULL));
       CHECK (SQLITE_OK ==
+            sqlite3_exec (plugin->dbh,
+                          "PRAGMA auto_vacuum=INCREMENTAL", NULL, NULL, 
ENULL));
+      CHECK (SQLITE_OK ==
             sq_prepare (plugin->dbh,
                         "PRAGMA page_count",
                         &stmt));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]