diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-04-01 18:20:44 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-04-01 18:20:44 +0000 |
commit | 3a3219bcc1d219bf012d20bcc87c03041f59044d (patch) | |
tree | aff9063ede978dad957d19ecd84f7b09c3de4768 /src/datastore/plugin_datastore_mysql.c | |
parent | a8de20af8037dc7fc0bdad2ebe235942b91f4f28 (diff) | |
download | gnunet-3a3219bcc1d219bf012d20bcc87c03041f59044d.tar.gz gnunet-3a3219bcc1d219bf012d20bcc87c03041f59044d.zip |
-removing legacy #ifdefs
Diffstat (limited to 'src/datastore/plugin_datastore_mysql.c')
-rw-r--r-- | src/datastore/plugin_datastore_mysql.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c index e2c77edd8..ed7741cfc 100644 --- a/src/datastore/plugin_datastore_mysql.c +++ b/src/datastore/plugin_datastore_mysql.c | |||
@@ -121,7 +121,6 @@ | |||
121 | #include "gnunet_util_lib.h" | 121 | #include "gnunet_util_lib.h" |
122 | #include "gnunet_mysql_lib.h" | 122 | #include "gnunet_mysql_lib.h" |
123 | 123 | ||
124 | #define DEBUG_MYSQL GNUNET_EXTRA_LOGGING | ||
125 | 124 | ||
126 | #define MAX_DATUM_SIZE 65536 | 125 | #define MAX_DATUM_SIZE 65536 |
127 | 126 | ||
@@ -227,10 +226,8 @@ do_delete_entry (struct Plugin *plugin, unsigned long long uid) | |||
227 | { | 226 | { |
228 | int ret; | 227 | int ret; |
229 | 228 | ||
230 | #if DEBUG_MYSQL | ||
231 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Deleting value %llu from gn090 table\n", | 229 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Deleting value %llu from gn090 table\n", |
232 | uid); | 230 | uid); |
233 | #endif | ||
234 | ret = GNUNET_MYSQL_statement_run_prepared (plugin->mc, | 231 | ret = GNUNET_MYSQL_statement_run_prepared (plugin->mc, |
235 | plugin->delete_entry_by_uid, NULL, | 232 | plugin->delete_entry_by_uid, NULL, |
236 | MYSQL_TYPE_LONGLONG, &uid, GNUNET_YES, -1); | 233 | MYSQL_TYPE_LONGLONG, &uid, GNUNET_YES, -1); |
@@ -323,11 +320,9 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
323 | MYSQL_TYPE_BLOB, &vhash, hashSize2, &hashSize2, | 320 | MYSQL_TYPE_BLOB, &vhash, hashSize2, &hashSize2, |
324 | MYSQL_TYPE_BLOB, data, lsize, &lsize, -1)) | 321 | MYSQL_TYPE_BLOB, data, lsize, &lsize, -1)) |
325 | return GNUNET_SYSERR; | 322 | return GNUNET_SYSERR; |
326 | #if DEBUG_MYSQL | ||
327 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 323 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
328 | "Inserted value `%s' with size %u into gn090 table\n", | 324 | "Inserted value `%s' with size %u into gn090 table\n", |
329 | GNUNET_h2s (key), (unsigned int) size); | 325 | GNUNET_h2s (key), (unsigned int) size); |
330 | #endif | ||
331 | if (size > 0) | 326 | if (size > 0) |
332 | plugin->env->duc (plugin->env->cls, size); | 327 | plugin->env->duc (plugin->env->cls, size); |
333 | return GNUNET_OK; | 328 | return GNUNET_OK; |
@@ -366,11 +361,9 @@ mysql_plugin_update (void *cls, uint64_t uid, int delta, | |||
366 | unsigned long long lexpire = expire.abs_value; | 361 | unsigned long long lexpire = expire.abs_value; |
367 | int ret; | 362 | int ret; |
368 | 363 | ||
369 | #if DEBUG_MYSQL | ||
370 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 364 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
371 | "Updating value %llu adding %d to priority and maxing exp at %llu\n", | 365 | "Updating value %llu adding %d to priority and maxing exp at %llu\n", |
372 | vkey, delta, lexpire); | 366 | vkey, delta, lexpire); |
373 | #endif | ||
374 | ret = | 367 | ret = |
375 | GNUNET_MYSQL_statement_run_prepared (plugin->mc, plugin->update_entry, NULL, | 368 | GNUNET_MYSQL_statement_run_prepared (plugin->mc, plugin->update_entry, NULL, |
376 | MYSQL_TYPE_LONG, &delta, GNUNET_NO, | 369 | MYSQL_TYPE_LONG, &delta, GNUNET_NO, |
@@ -456,11 +449,9 @@ execute_select (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stmt | |||
456 | proc (proc_cls, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0); | 449 | proc (proc_cls, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0); |
457 | return; | 450 | return; |
458 | } | 451 | } |
459 | #if DEBUG_MYSQL | ||
460 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 452 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
461 | "Found %u-byte value under key `%s' with prio %u, anon %u, expire %llu selecting from gn090 table\n", | 453 | "Found %u-byte value under key `%s' with prio %u, anon %u, expire %llu selecting from gn090 table\n", |
462 | (unsigned int) size, GNUNET_h2s (&key), priority, anonymity, exp); | 454 | (unsigned int) size, GNUNET_h2s (&key), priority, anonymity, exp); |
463 | #endif | ||
464 | GNUNET_assert (size < MAX_DATUM_SIZE); | 455 | GNUNET_assert (size < MAX_DATUM_SIZE); |
465 | expiration.abs_value = exp; | 456 | expiration.abs_value = exp; |
466 | ret = | 457 | ret = |
@@ -567,12 +558,9 @@ mysql_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key, | |||
567 | } | 558 | } |
568 | offset = offset % total; | 559 | offset = offset % total; |
569 | off = (unsigned long long) offset; | 560 | off = (unsigned long long) offset; |
570 | #if DEBUG_MYSQL | ||
571 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 561 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
572 | "Obtaining %llu/%lld result for GET `%s'\n", off, total, | 562 | "Obtaining %llu/%lld result for GET `%s'\n", off, total, |
573 | GNUNET_h2s (key)); | 563 | GNUNET_h2s (key)); |
574 | #endif | ||
575 | |||
576 | if (type != GNUNET_BLOCK_TYPE_ANY) | 564 | if (type != GNUNET_BLOCK_TYPE_ANY) |
577 | { | 565 | { |
578 | if (NULL != vhash) | 566 | if (NULL != vhash) |