From 60374f075270f8489e430c2967d36023f26ea2ef Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 30 Sep 2017 21:51:58 +0200 Subject: [PATCH] more aggressive index creation --- src/datastore/plugin_datastore_sqlite.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c index 77b8409cd..2d539cb19 100644 --- a/src/datastore/plugin_datastore_sqlite.c +++ b/src/datastore/plugin_datastore_sqlite.c @@ -185,21 +185,22 @@ static void create_indices (sqlite3 * dbh) { /* create indices */ - if ((SQLITE_OK != + if (0 != + (SQLITE_OK != sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_hash ON gn091 (hash)", - NULL, NULL, NULL)) || + NULL, NULL, NULL)) + (SQLITE_OK != sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_anon_type ON gn091 (anonLevel ASC,type)", - NULL, NULL, NULL)) || + NULL, NULL, NULL)) + (SQLITE_OK != sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_expire ON gn091 (expire ASC)", - NULL, NULL, NULL)) || + NULL, NULL, NULL)) + (SQLITE_OK != sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_repl_rvalue ON gn091 (repl,rvalue)", - NULL, NULL, NULL))) + NULL, NULL, NULL)) ) GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "sqlite", "Failed to create indices: %s\n", sqlite3_errmsg (dbh)); } -- 2.25.1