- if (send_length >= MEMCACHED_DEFAULT_COMMAND_SIZE)
- {
- rc= MEMCACHED_WRITE_FAILURE;
- goto error;
- }
-
- to_write= (ptr->flags & MEM_BUFFER_REQUESTS) ? 0 : 1;
-
- rc= memcached_do(ptr, server_key, buffer, send_length, to_write);
- if (rc != MEMCACHED_SUCCESS)
- goto error;
-
- if ((ptr->flags & MEM_BUFFER_REQUESTS))
- {
- rc= MEMCACHED_BUFFERED;
- }
- else
- {
- rc= memcached_response(ptr, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL, server_key);
- if (rc == MEMCACHED_DELETED)
- rc= MEMCACHED_SUCCESS;
- }
-
-error:
- LIBMEMCACHED_MEMCACHED_DELETE_END();
- return rc;
-}
-
-memcached_return memcached_mdelete(memcached_st *ptr,
- char **key, size_t *key_length,
- unsigned int number_of_keys,
- time_t expiration)
-{
- return memcached_mdelete_by_key(ptr, NULL, 0,
- key, key_length,
- number_of_keys, expiration);
-
-}
-
-memcached_return memcached_mdelete_by_key(memcached_st *ptr,
- char *master_key, size_t master_key_length,
- char **key, size_t *key_length,
- unsigned int number_of_keys,
- time_t expiration)
-{
- size_t send_length;
- memcached_return rc= MEMCACHED_SUCCESS;
- char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
- unsigned int master_server_key= 0;
- unsigned int x;
-
- LIBMEMCACHED_MEMCACHED_DELETE_START();