diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-07-26 19:15:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-07-26 19:15:11 +0000 |
commit | b87365d8c71868bc6ceb440671b9695165d209fd (patch) | |
tree | c53bd60f71ee19fd919eb4500ac3b4223ce2917d /src/datacache/plugin_datacache_sqlite.c | |
parent | 11b5bf96779e8a01b6e67e7375dd9420358d0625 (diff) | |
download | gnunet-b87365d8c71868bc6ceb440671b9695165d209fd.tar.gz gnunet-b87365d8c71868bc6ceb440671b9695165d209fd.zip |
fixing bugs, adding testcases
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 800241126..636303efc 100644 --- a/src/datacache/plugin_datacache_sqlite.c +++ b/src/datacache/plugin_datacache_sqlite.c | |||
@@ -236,7 +236,7 @@ sqlite_plugin_get (void *cls, | |||
236 | if (sqlite3_step (stmt) != SQLITE_ROW) | 236 | if (sqlite3_step (stmt) != SQLITE_ROW) |
237 | break; | 237 | break; |
238 | size = sqlite3_column_bytes (stmt, 0); | 238 | size = sqlite3_column_bytes (stmt, 0); |
239 | dat = sqlite3_column_blob (stmt, 1); | 239 | dat = sqlite3_column_blob (stmt, 0); |
240 | cnt++; | 240 | cnt++; |
241 | if (GNUNET_OK != iter (iter_cls, | 241 | if (GNUNET_OK != iter (iter_cls, |
242 | key, | 242 | key, |
@@ -279,7 +279,7 @@ sqlite_plugin_del (void *cls) | |||
279 | "SELECT type, key, value FROM ds090 ORDER BY expire ASC LIMIT 1", | 279 | "SELECT type, key, value FROM ds090 ORDER BY expire ASC LIMIT 1", |
280 | &stmt) != SQLITE_OK) || | 280 | &stmt) != SQLITE_OK) || |
281 | (sq_prepare (plugin->dbh, | 281 | (sq_prepare (plugin->dbh, |
282 | "DELETE FROM ds080 " | 282 | "DELETE FROM ds090 " |
283 | "WHERE key=? AND value=? AND type=?", | 283 | "WHERE key=? AND value=? AND type=?", |
284 | &dstmt) != SQLITE_OK)) | 284 | &dstmt) != SQLITE_OK)) |
285 | { | 285 | { |
@@ -398,7 +398,7 @@ libgnunet_plugin_datacache_sqlite_init (void *cls) | |||
398 | " expire INTEGER NOT NULL DEFAULT 0," | 398 | " expire INTEGER NOT NULL DEFAULT 0," |
399 | " key BLOB NOT NULL DEFAULT ''," | 399 | " key BLOB NOT NULL DEFAULT ''," |
400 | " value BLOB NOT NULL DEFAULT '')"); | 400 | " value BLOB NOT NULL DEFAULT '')"); |
401 | SQLITE3_EXEC (dbh, "CREATE INDEX idx_hashidx ON ds080 (key,type,expire)"); | 401 | SQLITE3_EXEC (dbh, "CREATE INDEX idx_hashidx ON ds090 (key,type,expire)"); |
402 | plugin = GNUNET_malloc (sizeof (struct Plugin)); | 402 | plugin = GNUNET_malloc (sizeof (struct Plugin)); |
403 | plugin->env = env; | 403 | plugin->env = env; |
404 | plugin->dbh = dbh; | 404 | plugin->dbh = dbh; |