* different buffers are now kept for different connections to
speed up async efforts
* Modified increment/decrement functions to return uint64_t values
+ * Fixed bug in cases where zero length keys were provided
0.8 Mon Nov 5 10:40:41 PST 2007
* Adding support for CRC hash method
MEMCACHED_ERRNO,
MEMCACHED_FAIL_UNIX_SOCKET,
MEMCACHED_NOT_SUPPORTED,
+ MEMCACHED_NO_KEY_PROVIDED,
MEMCACHED_MAXIMUM_RETURN, /* Always add new error code before */
} memcached_return;
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
unsigned int server_key;
+ if (key_length == 0)
+ return MEMCACHED_NO_KEY_PROVIDED;
+
if (ptr->hosts == NULL || ptr->number_of_hosts == 0)
return MEMCACHED_NO_SERVERS;
LIBMEMCACHED_MEMCACHED_DELETE_START();
+ if (key_length == 0)
+ return MEMCACHED_NO_KEY_PROVIDED;
+
if (ptr->hosts == NULL || ptr->number_of_hosts == 0)
return MEMCACHED_NO_SERVERS;
memcached_string_st *result_buffer;
LIBMEMCACHED_MEMCACHED_GET_START();
+ if (key_length == 0)
+ return MEMCACHED_NO_KEY_PROVIDED;
+
if (ptr->hosts == NULL || ptr->number_of_hosts == 0)
{
*error= MEMCACHED_NO_SERVERS;
WATCHPOINT_ASSERT(value);
WATCHPOINT_ASSERT(value_length);
+ if (key_length == 0)
+ return MEMCACHED_NO_KEY_PROVIDED;
+
/* Leaving this WATCHPOINT_ASSERT in since only a library fubar could blow this */
#ifdef NOT_DONE
if (!(ptr->flags & MEM_NO_BLOCK) && ptr->write_buffer_offset != 0)
return "COULD NOT OPEN UNIX SOCKET";
case MEMCACHED_NOT_SUPPORTED:
return "ACTION NOT SUPPORTED";
+ case MEMCACHED_NO_KEY_PROVIDED:
+ return "A KEY LENGTH OF ZERO WAS PROVIDED";
case MEMCACHED_MAXIMUM_RETURN:
return "Gibberish returned!";
default: