char key[MEMCACHED_MAX_KEY];
size_t key_length;
memcached_string_st value;
- uint16_t flags;
+ uint32_t flags;
uint64_t cas;
};
memcached_return memcached_set(memcached_st *ptr, char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags);
+ uint32_t flags);
memcached_return memcached_add(memcached_st *ptr, char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags);
+ uint32_t flags);
memcached_return memcached_replace(memcached_st *ptr, char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags);
+ uint32_t flags);
memcached_return memcached_append(memcached_st *ptr,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags);
+ uint32_t flags);
memcached_return memcached_prepend(memcached_st *ptr,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags);
+ uint32_t flags);
memcached_return memcached_cas(memcached_st *ptr,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags,
+ uint32_t flags,
uint64_t cas);
/* Get functions */
char *memcached_get(memcached_st *ptr, char *key, size_t key_length,
size_t *value_length,
- uint16_t *flags,
+ uint32_t *flags,
memcached_return *error);
memcached_return memcached_mget(memcached_st *ptr,
char **keys, size_t *key_length,
unsigned int number_of_keys);
char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length,
- size_t *value_length, uint16_t *flags,
+ size_t *value_length, uint32_t *flags,
memcached_return *error);
memcached_result_st *memcached_fetch_result(memcached_st *ptr,
memcached_result_st *result,
char *master_key, size_t master_key_length,
char *key, size_t key_length,
size_t *value_length,
- uint16_t *flags,
+ uint32_t *flags,
memcached_return *error);
memcached_return memcached_mget_by_key(memcached_st *ptr,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags);
+ uint32_t flags);
memcached_return memcached_add_by_key(memcached_st *ptr,
char *master_key, size_t master_key_length,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags);
+ uint32_t flags);
memcached_return memcached_replace_by_key(memcached_st *ptr,
char *master_key, size_t master_key_length,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags);
+ uint32_t flags);
memcached_return memcached_prepend_by_key(memcached_st *ptr,
char *master_key, size_t master_key_length,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags);
+ uint32_t flags);
memcached_return memcached_append_by_key(memcached_st *ptr,
char *master_key, size_t master_key_length,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags);
+ uint32_t flags);
memcached_return memcached_cas_by_key(memcached_st *ptr,
char *master_key, size_t master_key_length,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags,
+ uint32_t flags,
uint64_t cas);
memcached_return memcached_delete_by_key(memcached_st *ptr,
char *master_key, size_t master_key_length,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags,
+ uint32_t flags,
uint64_t cas,
memcached_storage_action verb)
{
memcached_return memcached_set(memcached_st *ptr, char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags)
+ uint32_t flags)
{
memcached_return rc;
LIBMEMCACHED_MEMCACHED_SET_START();
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags)
+ uint32_t flags)
{
memcached_return rc;
LIBMEMCACHED_MEMCACHED_ADD_START();
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags)
+ uint32_t flags)
{
memcached_return rc;
LIBMEMCACHED_MEMCACHED_REPLACE_START();
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags)
+ uint32_t flags)
{
memcached_return rc;
rc= memcached_send(ptr, key, key_length,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags)
+ uint32_t flags)
{
memcached_return rc;
rc= memcached_send(ptr, key, key_length,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags,
+ uint32_t flags,
uint64_t cas)
{
memcached_return rc;
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags)
+ uint32_t flags)
{
memcached_return rc;
LIBMEMCACHED_MEMCACHED_SET_START();
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags)
+ uint32_t flags)
{
memcached_return rc;
LIBMEMCACHED_MEMCACHED_ADD_START();
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags)
+ uint32_t flags)
{
memcached_return rc;
LIBMEMCACHED_MEMCACHED_REPLACE_START();
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags)
+ uint32_t flags)
{
memcached_return rc;
rc= memcached_send(ptr, key, key_length,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags)
+ uint32_t flags)
{
memcached_return rc;
rc= memcached_send(ptr, key, key_length,
char *key, size_t key_length,
char *value, size_t value_length,
time_t expiration,
- uint16_t flags,
+ uint32_t flags,
uint64_t cas)
{
memcached_return rc;
rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
return 0;
char *key= "fig";
char *value= "we";
size_t value_length;
- uint16_t flags;
+ uint32_t flags;
rc= memcached_flush(memc, 0);
assert(rc == MEMCACHED_SUCCESS);
rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
rc= memcached_append(memc, key, strlen(key),
" the", strlen(" the"),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
rc= memcached_append(memc, key, strlen(key),
" people", strlen(" people"),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
value= memcached_get(memc, key, strlen(key),
unsigned int store_list[] = { 23, 56, 499, 98, 32847, 0 };
char *value;
size_t value_length;
- uint16_t flags;
+ uint32_t flags;
unsigned int x;
rc= memcached_flush(memc, 0);
rc= memcached_set(memc,
key, strlen(key),
NULL, 0,
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
for (x= 0; store_list[x] ; x++)
rc= memcached_append(memc,
key, strlen(key),
(char *)&store_list[x], sizeof(unsigned int),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
}
{
rc= memcached_set(memc, keys[x], key_length[x],
keys[x], key_length[x],
- (time_t)50, (uint16_t)9);
+ (time_t)50, (uint32_t)9);
assert(rc == MEMCACHED_SUCCESS);
}
rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
rc= memcached_mget(memc, &key, &key_length, 1);
char *key= "fig";
char *value= "people";
size_t value_length;
- uint16_t flags;
+ uint32_t flags;
rc= memcached_flush(memc, 0);
assert(rc == MEMCACHED_SUCCESS);
rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
rc= memcached_prepend(memc, key, strlen(key),
"the ", strlen("the "),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
rc= memcached_prepend(memc, key, strlen(key),
"we ", strlen("we "),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
value= memcached_get(memc, key, strlen(key),
rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
memcached_quit(memc);
rc= memcached_add(memc, key, strlen(key),
value, strlen(value),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_NOTSTORED);
return 0;
rc= memcached_replace(memc, key, strlen(key),
value, strlen(value),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
return 0;
rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
rc= memcached_delete(memc, key, strlen(key), (time_t)0);
char *key= "foo";
char *string;
size_t string_length;
- uint16_t flags;
+ uint32_t flags;
rc= memcached_delete(memc, key, strlen(key), (time_t)0);
assert(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_NOTFOUND);
char *value= "when we sanitize";
char *string;
size_t string_length;
- uint16_t flags;
+ uint32_t flags;
rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
string= memcached_get(memc, key, strlen(key),
{
rc= memcached_set(memc, key, strlen(key),
value, value_length,
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
}
{
rc= memcached_set(memc, key, strlen(key),
value, value_length,
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
}
size_t value_length= 8191;
char *string;
size_t string_length;
- uint16_t flags;
+ uint32_t flags;
int x;
value = (char*)malloc(value_length);
rc= memcached_set(memc, key, strlen(key),
value, value_length,
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
string= memcached_get(memc, key, strlen(key),
size_t value_length= 8191;
char *string;
size_t string_length;
- uint16_t flags;
+ uint32_t flags;
int x;
value = (char*)malloc(value_length);
rc= memcached_set(memc, key, strlen(key),
value, value_length,
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
for (x= 0; x < 10; x++)
rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
rc= memcached_increment(memc, key, strlen(key),
rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
rc= memcached_decrement(memc, key, strlen(key),
rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
- (time_t)10, (uint16_t)3);
+ (time_t)10, (uint32_t)3);
assert(rc == MEMCACHED_SUCCESS);
memcached_quit(memc);
rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
- (time_t)50, (uint16_t)9);
+ (time_t)50, (uint32_t)9);
assert(rc == MEMCACHED_SUCCESS);
return 0;
{
rc= memcached_set(memc, keys[x], key_length[x],
keys[x], key_length[x],
- (time_t)50, (uint16_t)9);
+ (time_t)50, (uint32_t)9);
assert(rc == MEMCACHED_SUCCESS);
}
{
rc= memcached_set(memc, keys[x], key_length[x],
keys[x], key_length[x],
- (time_t)50, (uint16_t)9);
+ (time_t)50, (uint32_t)9);
assert(rc == MEMCACHED_SUCCESS);
}
char *keys[]= {"fudge", "son", "food"};
size_t key_length[]= {5, 3, 4};
unsigned int x;
- uint16_t flags;
+ uint32_t flags;
char return_key[MEMCACHED_MAX_KEY];
size_t return_key_length;
{
rc= memcached_set(memc, keys[x], key_length[x],
keys[x], key_length[x],
- (time_t)50, (uint16_t)9);
+ (time_t)50, (uint32_t)9);
assert(rc == MEMCACHED_SUCCESS);
}
{
memcached_return rc= MEMCACHED_SUCCESS;
char buffer[SMALL_STRING_LEN];
- uint16_t flags= 0;
+ uint32_t flags= 0;
size_t val_len= 0;
char *getval;
size_t return_key_length;
char *return_value;
size_t return_value_length;
- uint16_t flags;
+ uint32_t flags;
while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
&return_value_length, &flags, &rc)))
char *keys[]= {"fudge", "son", "food"};
size_t key_length[]= {5, 3, 4};
unsigned int x;
- uint16_t flags;
+ uint32_t flags;
/* Here we free everything before running a bunch of mget tests */
{
{
rc= memcached_set(memc, keys[x], key_length[x],
keys[x], key_length[x],
- (time_t)50, (uint16_t)9);
+ (time_t)50, (uint32_t)9);
assert(rc == MEMCACHED_NO_SERVERS);
}
size_t return_key_length;
char *value;
size_t value_length;
- uint16_t flags;
+ uint32_t flags;
unsigned int count;
unsigned int x;
char insert_data[VALUE_SIZE_BUG5];
{
rc= memcached_set(memc, keys[x], key_length[x],
insert_data, VALUE_SIZE_BUG5,
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
}
size_t return_key_length;
char *value;
size_t value_length;
- uint16_t flags;
+ uint32_t flags;
unsigned int count;
unsigned int x;
char insert_data[VALUE_SIZE_BUG5];
{
rc= memcached_set(memc, keys[x], key_length[x],
insert_data, VALUE_SIZE_BUG5,
- (time_t)0, (uint16_t)0);
+ (time_t)0, (uint32_t)0);
assert(rc == MEMCACHED_SUCCESS);
}
size_t return_key_length;
char *value;
size_t value_length;
- uint16_t flags;
+ uint32_t flags;
unsigned int x;
char insert_data[VALUE_SIZE_BUG5];
char *keys[]= {"UDATA:edevil@sapo.pt", "fudge&*@#", "for^#@&$not"};
size_t key_length[3];
unsigned int x;
- uint16_t flags;
+ uint32_t flags;
unsigned count= 0;
char return_key[MEMCACHED_MAX_KEY];
{
rc= memcached_set(memc, keys[x], key_length[x],
keys[x], key_length[x],
- (time_t)50, (uint16_t)9);
+ (time_t)50, (uint32_t)9);
assert(rc == MEMCACHED_SUCCESS);
}
{
char *return_value;
size_t return_value_length;
- uint16_t flags;
+ uint32_t flags;
for (x= 0; x < GLOBAL_COUNT; x++)
{
size_t return_key_length;
char *return_value;
size_t return_value_length;
- uint16_t flags;
+ uint32_t flags;
while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
&return_value_length, &flags, &rc)))