aboutsummaryrefslogtreecommitdiff
path: root/src/datacache/plugin_datacache_sqlite.c
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2009-07-26 19:15:11 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2009-07-26 19:15:11 +0000
commit3f35baf68c7913844fd818f83494ba620738b4b7 (patch)
treec53bd60f71ee19fd919eb4500ac3b4223ce2917d /src/datacache/plugin_datacache_sqlite.c
parenteddb74219df460bdb0cb1f9419d7412501b5ceb4 (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.c6
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;