* Added MEMCACHED_BAD_KEY_PROVIDED error for auto, set, and get operations.
MEMCACHED_BEHAVIOR_VERIFY_KEY was added to enable this feature.
* More error messages on command line tools.
+ * Fixed bugs in memcached_cas() operator.
0.15 Tue Jan 29 14:55:44 PST 2008
* More work on the C++ API.
memcached_io_reset(ptr);
return MEMCACHED_PROTOCOL_ERROR;
}
+ else if (buffer[1] == 'X')
+ {
+ memcached_io_reset(ptr);
+ return MEMCACHED_DATA_EXISTS;
+ }
else
{
memcached_io_reset(ptr);
memcached_return rc;
rc= memcached_send(ptr, key, key_length,
key, key_length, value, value_length,
- expiration, flags, cas, APPEND_OP);
+ expiration, flags, cas, CAS_OP);
return rc;
}
memcached_return rc;
rc= memcached_send(ptr, key, key_length,
key, key_length, value, value_length,
- expiration, flags, cas, APPEND_OP);
+ expiration, flags, cas, CAS_OP);
return rc;
}
assert(strlen("we the people") == value_length);
assert(rc == MEMCACHED_SUCCESS);
+ rc= memcached_cas(memc, key, key_length,
+ "change the value", strlen("change the value"),
+ 0, 0, memcached_result_cas(results));
+
+ assert(rc == MEMCACHED_SUCCESS);
+
+ rc= memcached_cas(memc, key, key_length,
+ "change the value", strlen("change the value"),
+ 0, 0, 23);
+
+ assert(rc == MEMCACHED_DATA_EXISTS);
+
+
memcached_result_free(&results_obj);
return 0;