diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-09-30 21:51:58 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-09-30 21:52:07 +0200 |
commit | 60374f075270f8489e430c2967d36023f26ea2ef (patch) | |
tree | 0ab03c52263f17990159c61ed3b185efc22a0440 | |
parent | 6570a7980a945cd3e6484baa8777512506b9ba49 (diff) |
more aggressive index creation
-rw-r--r-- | src/datastore/plugin_datastore_sqlite.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c index 77b8409cdd..2d539cb191 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)); } |