aboutsummaryrefslogtreecommitdiff
path: root/src/datacache
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-08-27 11:19:27 +0000
committerChristian Grothoff <christian@grothoff.org>2010-08-27 11:19:27 +0000
commit7222ddd36eb376fc2b1465a700d8ae496af006b7 (patch)
treea311aaa86a800121d64fda423b40549aa7ed13b2 /src/datacache
parentac955dcaf0eb30869f47d6aaf3464ceaebd5fa26 (diff)
downloadgnunet-7222ddd36eb376fc2b1465a700d8ae496af006b7.tar.gz
gnunet-7222ddd36eb376fc2b1465a700d8ae496af006b7.zip
fix
Diffstat (limited to 'src/datacache')
-rw-r--r--src/datacache/plugin_datacache_postgres.c10
-rw-r--r--src/datacache/test_datacache_data_postgres.conf2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index 5959d54a6..53118e6bf 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -154,7 +154,7 @@ init_connection (struct Plugin *plugin)
154 return GNUNET_SYSERR; 154 return GNUNET_SYSERR;
155 } 155 }
156 ret = PQexec (plugin->dbh, 156 ret = PQexec (plugin->dbh,
157 "CREATE TEMPORARY `TABLE gn090dc (" 157 "CREATE TEMPORARY TABLE gn090dc ("
158 " type INTEGER NOT NULL DEFAULT 0," 158 " type INTEGER NOT NULL DEFAULT 0,"
159 " discard_time BIGINT NOT NULL DEFAULT 0," 159 " discard_time BIGINT NOT NULL DEFAULT 0,"
160 " key BYTEA NOT NULL DEFAULT ''," 160 " key BYTEA NOT NULL DEFAULT '',"
@@ -177,7 +177,7 @@ init_connection (struct Plugin *plugin)
177 if ((GNUNET_OK != 177 if ((GNUNET_OK !=
178 pq_exec (plugin, "CREATE INDEX idx_key ON gn090dc (key)", __LINE__)) || 178 pq_exec (plugin, "CREATE INDEX idx_key ON gn090dc (key)", __LINE__)) ||
179 (GNUNET_OK != 179 (GNUNET_OK !=
180 pq_exec (plugin, "CREATE INDEX idx_dt ON gn090 (discard_time)", 180 pq_exec (plugin, "CREATE INDEX idx_dt ON gn090dc (discard_time)",
181 __LINE__)) ) 181 __LINE__)) )
182 { 182 {
183 PQclear (ret); 183 PQclear (ret);
@@ -217,20 +217,20 @@ init_connection (struct Plugin *plugin)
217 pq_prepare (plugin, 217 pq_prepare (plugin,
218 "getkt", 218 "getkt",
219 "SELECT discard_time,type,value FROM gn090dc " 219 "SELECT discard_time,type,value FROM gn090dc "
220 "WHERE hash=$1 type=$2 ", 220 "WHERE key=$1 AND type=$2 ",
221 2, 221 2,
222 __LINE__)) || 222 __LINE__)) ||
223 (GNUNET_OK != 223 (GNUNET_OK !=
224 pq_prepare (plugin, 224 pq_prepare (plugin,
225 "getk", 225 "getk",
226 "SELECT discard_time,type,value FROM gn090dc " 226 "SELECT discard_time,type,value FROM gn090dc "
227 "WHERE hash=$1", 227 "WHERE key=$1",
228 1, 228 1,
229 __LINE__)) || 229 __LINE__)) ||
230 (GNUNET_OK != 230 (GNUNET_OK !=
231 pq_prepare (plugin, 231 pq_prepare (plugin,
232 "getm", 232 "getm",
233 "SELECT length(value),oid FROM gn090dc" 233 "SELECT length(value),oid FROM gn090dc "
234 "ORDER BY discard_time ASC LIMIT 1", 234 "ORDER BY discard_time ASC LIMIT 1",
235 0, 235 0,
236 __LINE__)) || 236 __LINE__)) ||
diff --git a/src/datacache/test_datacache_data_postgres.conf b/src/datacache/test_datacache_data_postgres.conf
index 51d2dae64..eca2d5c54 100644
--- a/src/datacache/test_datacache_data_postgres.conf
+++ b/src/datacache/test_datacache_data_postgres.conf
@@ -1,7 +1,7 @@
1 1
2[testcache] 2[testcache]
3QUOTA = 1000000 3QUOTA = 1000000
4DATABASE = postgrers 4DATABASE = postgres
5 5
6[datacache-postgres] 6[datacache-postgres]
7CONFIG = dbname=gnunetcheck 7CONFIG = dbname=gnunetcheck