libmemcached_io_vector_st vector[]=
{
+ { NULL, 0 },
{ memcached_literal_param("incr ") },
{ memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) },
{ key, key_length },
if (is_incr == false)
{
- vector[0].buffer= "decr ";
+ vector[1].buffer= "decr ";
}
- memcached_return_t rc= memcached_vdo(instance, vector, 6, true);
+ memcached_return_t rc= memcached_vdo(instance, vector, 7, true);
if (reply == false)
{
libmemcached_io_vector_st vector[]=
{
+ { NULL, 0 },
{ request.bytes, sizeof(request.bytes) },
{ memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) },
{ key, key_length }
};
memcached_return_t rc;
- if (memcached_failed(rc= memcached_vdo(instance, vector, 3, true)))
+ if (memcached_failed(rc= memcached_vdo(instance, vector, 4, true)))
{
memcached_io_reset(instance);
return MEMCACHED_WRITE_FAILURE;
{
libmemcached_io_vector_st vector[]=
{
+ { NULL, 0 },
{ memcached_literal_param("delete ") },
{ memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) },
{ key, key_length },
if (memcached_is_udp(instance->root))
{
- size_t send_length= io_vector_total_size(vector, 5);
+ size_t send_length= io_vector_total_size(vector, 6);
if (send_length > MAX_UDP_DATAGRAM_LENGTH - UDP_DATAGRAM_HEADER_LENGTH)
{
}
/* Send command header */
- return memcached_vdo(instance, vector, 5, flush);
+ return memcached_vdo(instance, vector, 6, flush);
}
static inline memcached_return_t binary_delete(memcached_server_write_instance_st instance,
libmemcached_io_vector_st vector[]=
{
+ { NULL, 0 },
{ request.bytes, sizeof(request.bytes) },
{ memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) },
{ key, key_length }
memcached_return_t rc= MEMCACHED_SUCCESS;
- if ((rc= memcached_vdo(instance, vector, 3, flush)) != MEMCACHED_SUCCESS)
+ if ((rc= memcached_vdo(instance, vector, 4, flush)) != MEMCACHED_SUCCESS)
{
memcached_io_reset(instance);
}
for (uint32_t x= 0; x < instance->root->number_of_replicas; ++x)
{
- memcached_server_write_instance_st replica;
++server_key;
if (server_key == memcached_server_count(instance->root))
+ {
server_key= 0;
+ }
- replica= memcached_server_instance_fetch(instance->root, server_key);
+ memcached_server_write_instance_st replica= memcached_server_instance_fetch(instance->root, server_key);
- if (memcached_vdo(replica, vector, 3, flush) != MEMCACHED_SUCCESS)
+ if (memcached_vdo(replica, vector, 4, flush) != MEMCACHED_SUCCESS)
{
memcached_io_reset(replica);
}
{
libmemcached_io_vector_st vector[]=
{
+ { NULL, 0 },
{ memcached_literal_param("add ") },
{ memcached_array_string(memc->_namespace), memcached_array_size(memc->_namespace) },
{ key, key_length },
};
/* Send command header */
- memcached_return_t rc= memcached_vdo(instance, vector, 8, true);
+ memcached_return_t rc= memcached_vdo(instance, vector, 9, true);
if (rc == MEMCACHED_SUCCESS)
{
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
libmemcached_io_vector_st vector[]=
{
+ { NULL, 0 },
{ request.bytes, send_length },
{ memcached_array_string(memc->_namespace), memcached_array_size(memc->_namespace) },
{ key, key_length }
/* write the header */
memcached_return_t rc;
- if ((rc= memcached_vdo(instance, vector, 3, true)) != MEMCACHED_SUCCESS)
+ if ((rc= memcached_vdo(instance, vector, 4, true)) != MEMCACHED_SUCCESS)
{
memcached_io_reset(instance);
return (rc == MEMCACHED_SUCCESS) ? MEMCACHED_WRITE_FAILURE : rc;
libmemcached_io_vector_st vector[]=
{
+ { NULL, 0 },
{ request.bytes, send_length },
{ memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) },
{ key, key_length },
/* write the header */
memcached_return_t rc;
- if ((rc= memcached_vdo(server, vector, 4, flush)) != MEMCACHED_SUCCESS)
+ if ((rc= memcached_vdo(server, vector, 5, flush)) != MEMCACHED_SUCCESS)
{
memcached_io_reset(server);
memcached_server_write_instance_st instance= memcached_server_instance_fetch(ptr, server_key);
- if (memcached_vdo(instance, vector, 4, false) != MEMCACHED_SUCCESS)
+ if (memcached_vdo(instance, vector, 5, false) != MEMCACHED_SUCCESS)
{
memcached_io_reset(instance);
}
libmemcached_io_vector_st vector[]=
{
+ { NULL, 0 },
{ storage_op_string(verb), strlen(storage_op_string(verb))},
{ memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) },
{ key, key_length },
};
/* Send command header */
- memcached_return_t rc= memcached_vdo(instance, vector, 11, flush);
+ memcached_return_t rc= memcached_vdo(instance, vector, 12, flush);
if (rc == MEMCACHED_SUCCESS)
{
if (flush == false)
libmemcached_io_vector_st vector[]=
{
+ { NULL, 0 },
{ memcached_literal_param("touch ") },
{ memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) },
{ key, key_length },
};
memcached_return_t rc;
- if (memcached_failed(rc= memcached_vdo(instance, vector, 5, true)))
+ if (memcached_failed(rc= memcached_vdo(instance, vector, 6, true)))
{
memcached_io_reset(instance);
return memcached_set_error(*instance, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT);
libmemcached_io_vector_st vector[]=
{
+ { NULL, 0 },
{ request.bytes, sizeof(request.bytes) },
{ memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) },
{ key, key_length }
};
memcached_return_t rc;
- if (memcached_failed(rc= memcached_vdo(instance, vector, 3, true)))
+ if (memcached_failed(rc= memcached_vdo(instance, vector, 4, true)))
{
memcached_io_reset(instance);
return memcached_set_error(*instance, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT);