This patch fixes the memcached bug
https://code.google.com/p/memcached/issues/detail?id=306,
which is not yet fixed upstream as of memcached v1.4.15.
When we upgrade to an upstream version which fixes this problem,
we can delete this patch.
Part of the fix comes from the above bug location.
The full fix is here:
http://debian.2.n7.nabble.com/attachment/2851013/0/memcached_1.4.13-0.2.debdiff
--- memcached-1.4.5-orig/items.c 2010-04-03 00:07:16.000000000 -0700
+++ memcached-1.4.5/items.c 2013-03-15 16:26:17.095818000 -0700
@@ -468,9 +468,17 @@ item *do_item_get(const char *key, const
if (settings.verbose > 2) {
if (it == NULL) {
- fprintf(stderr, "> NOT FOUND %s", key);
+ int ii;
+ fprintf(stderr, "> NOT FOUND ");
+ for (ii = 0; ii < nkey; ++ii) {
+ fprintf(stderr, "%c", key[ii]);
+ }
} else {
- fprintf(stderr, "> FOUND KEY %s", ITEM_key(it));
+ int ii;
+ fprintf(stderr, "> FOUND KEY ");
+ for (ii = 0; ii < it->nkey; ++ii) {
+ fprintf(stderr, "%c", ITEM_key(it)[ii]);
+ }
was_found++;
}
}
--- memcached-1.4.5-orig/memcached.c 2010-04-03 12:51:29.000000000 -0700
+++ memcached-1.4.5/memcached.c 2013-01-15 17:30:53.964483000 -0800
@@ -2001,7 +2001,12 @@ static void process_bin_delete(conn *c)
assert(c != NULL);
if (settings.verbose > 1) {
- fprintf(stderr, "Deleting %s\n", key);
+ int ii;
+ fprintf(stderr, "Deleting ");
+ for (ii = 0; ii < nkey; ++ii) {
+ fprintf(stderr, "%c", key[ii]);
+ }
+ fprintf(stderr, "\n");
}
if (settings.detail_enabled) {