aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/plugin_datastore_sqlite.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-05-18 07:18:27 +0000
committerChristian Grothoff <christian@grothoff.org>2010-05-18 07:18:27 +0000
commit5b3e72645c94133b752eb999fb98bfb7f4e7ec8f (patch)
tree322cf226cc5c85a75dd17b7098584f28d406a806 /src/datastore/plugin_datastore_sqlite.c
parent2aed6a345561957d952dbe22557599e9c275a094 (diff)
downloadgnunet-5b3e72645c94133b752eb999fb98bfb7f4e7ec8f.tar.gz
gnunet-5b3e72645c94133b752eb999fb98bfb7f4e7ec8f.zip
use v2
Diffstat (limited to 'src/datastore/plugin_datastore_sqlite.c')
-rw-r--r--src/datastore/plugin_datastore_sqlite.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index 6e20a7491..45fd05e6f 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -180,9 +180,9 @@ sq_prepare (sqlite3 * dbh, const char *zSql,
180 sqlite3_stmt ** ppStmt) 180 sqlite3_stmt ** ppStmt)
181{ 181{
182 char *dummy; 182 char *dummy;
183 return sqlite3_prepare (dbh, 183 return sqlite3_prepare_v2 (dbh,
184 zSql, 184 zSql,
185 strlen (zSql), ppStmt, (const char **) &dummy); 185 strlen (zSql), ppStmt, (const char **) &dummy);
186} 186}
187 187
188 188
@@ -776,7 +776,7 @@ sqlite_plugin_put (void *cls,
776 return GNUNET_SYSERR; 776 return GNUNET_SYSERR;
777 } 777 }
778 n = sqlite3_step (stmt); 778 n = sqlite3_step (stmt);
779 if (n != SQLITE_DONE) 779 if (n != SQLITE_DONE)
780 { 780 {
781 if (n == SQLITE_BUSY) 781 if (n == SQLITE_BUSY)
782 { 782 {
@@ -1065,7 +1065,7 @@ basic_iter (struct Plugin *plugin,
1065 { 1065 {
1066 LOG_SQLITE (plugin, NULL, 1066 LOG_SQLITE (plugin, NULL,
1067 GNUNET_ERROR_TYPE_ERROR | 1067 GNUNET_ERROR_TYPE_ERROR |
1068 GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare"); 1068 GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare_v2");
1069 iter (iter_cls, NULL, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0); 1069 iter (iter_cls, NULL, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0);
1070 return; 1070 return;
1071 } 1071 }
@@ -1073,7 +1073,7 @@ basic_iter (struct Plugin *plugin,
1073 { 1073 {
1074 LOG_SQLITE (plugin, NULL, 1074 LOG_SQLITE (plugin, NULL,
1075 GNUNET_ERROR_TYPE_ERROR | 1075 GNUNET_ERROR_TYPE_ERROR |
1076 GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare"); 1076 GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare_v2");
1077 sqlite3_finalize (stmt_1); 1077 sqlite3_finalize (stmt_1);
1078 iter (iter_cls, NULL, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0); 1078 iter (iter_cls, NULL, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0);
1079 return; 1079 return;
@@ -1315,7 +1315,7 @@ sqlite_plugin_iter_all_now (void *cls,
1315 { 1315 {
1316 LOG_SQLITE (plugin, NULL, 1316 LOG_SQLITE (plugin, NULL,
1317 GNUNET_ERROR_TYPE_ERROR | 1317 GNUNET_ERROR_TYPE_ERROR |
1318 GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare"); 1318 GNUNET_ERROR_TYPE_BULK, "sqlite3_prepare_v2");
1319 iter (iter_cls, NULL, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0); 1319 iter (iter_cls, NULL, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0);
1320 return; 1320 return;
1321 } 1321 }
@@ -1619,11 +1619,11 @@ process_stat_done (void *cls,
1619 if (plugin->stats_worked == GNUNET_NO) 1619 if (plugin->stats_worked == GNUNET_NO)
1620 { 1620 {
1621 CHECK (SQLITE_OK == 1621 CHECK (SQLITE_OK ==
1622 sq_prepare (plugin->dbh, 1622 sqlite3_exec (plugin->dbh,
1623 "VACUUM;", 1623 "VACUUM", NULL, NULL, ENULL));
1624 &stmt)); 1624 CHECK (SQLITE_OK ==
1625 sqlite3_step (stmt); 1625 sqlite3_exec (plugin->dbh,
1626 sqlite3_finalize (stmt); 1626 "PRAGMA auto_vacuum=INCREMENTAL", NULL, NULL, ENULL));
1627 CHECK (SQLITE_OK == 1627 CHECK (SQLITE_OK ==
1628 sq_prepare (plugin->dbh, 1628 sq_prepare (plugin->dbh,
1629 "PRAGMA page_count", 1629 "PRAGMA page_count",