Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Preserve flags in arithmetic operations

Change-Id: Ia37c47a5789d01d4d0f8262cab1cda2eda227a1f
Reviewed-on: http://review.couchbase.org/12442
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Jan Lehnardt <jan@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
  • Loading branch information...
commit f6dc3cf812e2f5d4833af31be063715071f10590 1 parent 947e003
@avsej avsej authored ingenthr committed
View
2  src/main/java/org/couchbase/mock/memcached/ArithmeticCommandExecutor.java
@@ -72,7 +72,7 @@ public void execute(BinaryCommand command, MemcachedServer server, MemcachedConn
}
int exp = cmd.getExpiration() > 0 ? cmd.getExpiration() : item.getExptime();
- Item nval = new Item(cmd.getKey(), 0, exp, Long.toString(value).getBytes(), item.getCas());
+ Item nval = new Item(cmd.getKey(), item.getFlags(), exp, Long.toString(value).getBytes(), item.getCas());
ErrorCode err = server.getDatastore().set(server, cmd.getVBucketId(), nval);
if (err == ErrorCode.SUCCESS) {
if (cc == ComCode.INCREMENT || cc == ComCode.DECREMENT) {
Please sign in to comment.
Something went wrong with that request. Please try again.