diff options
-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)); } |