16173842 problem in DATABASE/MEMCACHED s11-update
authorApril Chin <april.chin@oracle.com>
Mon, 22 Apr 2013 09:00:39 -0700
branchs11-update
changeset 2578 e11df23929df
parent 2576 f1b6ecbb2d1e
child 2580 8c526cc86bc0
16173842 problem in DATABASE/MEMCACHED
components/memcached/patches/01-tests.patch
components/memcached/patches/02-memcached-items-c.patch
components/memcached/patches/tests.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/memcached/patches/01-tests.patch	Mon Apr 22 09:00:39 2013 -0700
@@ -0,0 +1,15 @@
+--- memcached-1.4.5/Makefile.in.orig	Mon May  9 12:37:54 2011
++++ memcached-1.4.5/Makefile.in	Mon May  9 12:38:40 2011
[email protected]@ -1194,9 +1194,9 @@
+ 	$(DTRACE) $(DTRACEFLAGS) -G -o memcached_debug_dtrace.o -s ${srcdir}/memcached_dtrace.d $(memcached_debug_OBJECTS)
+ 
+ test:	memcached-debug sizes testapp
+-	$(srcdir)/sizes
+-	$(srcdir)/testapp
+-	prove $(srcdir)/t
++	./sizes
++	./testapp
++	prove ./t
+ 	@if test `basename $(PROFILER)` = "gcov"; then \
+ 	  for file in memcached_debug-*.gc??; do \
+ 	    mv -f $$file `echo $$file | sed 's/memcached_debug-//'`; \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/memcached/patches/02-memcached-items-c.patch	Mon Apr 22 09:00:39 2013 -0700
@@ -0,0 +1,47 @@
+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
[email protected]@ -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
[email protected]@ -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) {
--- a/components/memcached/patches/tests.patch	Thu Apr 18 08:16:56 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
---- memcached-1.4.5/Makefile.in.orig	Mon May  9 12:37:54 2011
-+++ memcached-1.4.5/Makefile.in	Mon May  9 12:38:40 2011
[email protected]@ -1194,9 +1194,9 @@
- 	$(DTRACE) $(DTRACEFLAGS) -G -o memcached_debug_dtrace.o -s ${srcdir}/memcached_dtrace.d $(memcached_debug_OBJECTS)
- 
- test:	memcached-debug sizes testapp
--	$(srcdir)/sizes
--	$(srcdir)/testapp
--	prove $(srcdir)/t
-+	./sizes
-+	./testapp
-+	prove ./t
- 	@if test `basename $(PROFILER)` = "gcov"; then \
- 	  for file in memcached_debug-*.gc??; do \
- 	    mv -f $$file `echo $$file | sed 's/memcached_debug-//'`; \