diff options
author | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2009-07-26 19:15:11 +0000 |
---|---|---|
committer | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2009-07-26 19:15:11 +0000 |
commit | 3f35baf68c7913844fd818f83494ba620738b4b7 (patch) | |
tree | c53bd60f71ee19fd919eb4500ac3b4223ce2917d /src/datacache/plugin_datacache_sqlite.c | |
parent | eddb74219df460bdb0cb1f9419d7412501b5ceb4 (diff) |
fixing bugs, adding testcases
git-svn-id: https://gnunet.org/svn/gnunet@8788 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/datacache/plugin_datacache_sqlite.c')
-rw-r--r-- | src/datacache/plugin_datacache_sqlite.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c index 800241126b..636303efc3 100644 --- a/src/datacache/plugin_datacache_sqlite.c +++ b/src/datacache/plugin_datacache_sqlite.c @@ -236,7 +236,7 @@ sqlite_plugin_get (void *cls, if (sqlite3_step (stmt) != SQLITE_ROW) break; size = sqlite3_column_bytes (stmt, 0); - dat = sqlite3_column_blob (stmt, 1); + dat = sqlite3_column_blob (stmt, 0); cnt++; if (GNUNET_OK != iter (iter_cls, key, @@ -279,7 +279,7 @@ sqlite_plugin_del (void *cls) "SELECT type, key, value FROM ds090 ORDER BY expire ASC LIMIT 1", &stmt) != SQLITE_OK) || (sq_prepare (plugin->dbh, - "DELETE FROM ds080 " + "DELETE FROM ds090 " "WHERE key=? AND value=? AND type=?", &dstmt) != SQLITE_OK)) { @@ -398,7 +398,7 @@ libgnunet_plugin_datacache_sqlite_init (void *cls) " expire INTEGER NOT NULL DEFAULT 0," " key BLOB NOT NULL DEFAULT ''," " value BLOB NOT NULL DEFAULT '')"); - SQLITE3_EXEC (dbh, "CREATE INDEX idx_hashidx ON ds080 (key,type,expire)"); + SQLITE3_EXEC (dbh, "CREATE INDEX idx_hashidx ON ds090 (key,type,expire)"); plugin = GNUNET_malloc (sizeof (struct Plugin)); plugin->env = env; plugin->dbh = dbh; |