/* This is for historical reasons */
if (*error == MEMCACHED_END)
+ {
*error= MEMCACHED_NOTFOUND;
+ }
if (value == NULL)
{
memcached_return_t rc= ptr->get_key_failure(ptr, key, key_length, &ptr->result);
/* On all failure drop to returning NULL */
- if (rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED)
+ if (rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED)
{
if (rc == MEMCACHED_BUFFERED)
{
uint64_t latch; /* We use latch to track the state of the original socket */
latch= memcached_behavior_get(ptr, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS);
if (latch == 0)
+ {
memcached_behavior_set(ptr, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 1);
+ }
rc= memcached_set(ptr, key, key_length,
(memcached_result_value(&ptr->result)),
if (memcached_failed(memcached_key_test(*ptr, keys, key_length, number_of_keys)))
{
- return memcached_set_error(*ptr, MEMCACHED_BAD_KEY_PROVIDED, MEMCACHED_AT, memcached_literal_param("A bad key value was provided"));
+ return memcached_last_error(ptr);
}
bool is_group_key_set= false;
if (memcached_is_binary(ptr) == false)
{
- return MEMCACHED_NOT_SUPPORTED;
+ return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT,
+ memcached_literal_param("ASCII protocol is not supported for memcached_mget_execute_by_key()"));
}
memcached_callback_st *original_callbacks= ptr->callbacks;
protocol_binary_request_getk request= { }; //= {.bytes= {0}};
request.message.header.request.magic= PROTOCOL_BINARY_REQ;
if (mget_mode)
+ {
request.message.header.request.opcode= PROTOCOL_BINARY_CMD_GETKQ;
+ }
else
+ {
request.message.header.request.opcode= PROTOCOL_BINARY_CMD_GETK;
+ }
memcached_return_t vk;
vk= memcached_validate_key_length(key_length[x],
ptr->flags.binary_protocol);
- unlikely (vk != MEMCACHED_SUCCESS)
+ if (vk != MEMCACHED_SUCCESS)
{
if (x > 0)
{