diff options
author | dormando <dormando@rydia.net> | 2021-12-15 15:54:21 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2022-01-12 14:04:32 -0800 |
commit | 706d47e26a755df0141f306d4ae2da5c1d815fdb (patch) | |
tree | 764cb5cb4a26275a00bc3e99d0abf0d5f1e9d146 /proto_text.c | |
parent | 7af02b0c875a36c61875a332dda582375014cf44 (diff) | |
download | memcached-706d47e26a755df0141f306d4ae2da5c1d815fdb.tar.gz |
meta: fix CAS ('c') return values
This should now align with the binary protocol. It might make sense for
this to return the _current_ CAS value of the underlying item in the
cases of EX... binprot does not currently do this, and the storage code
is shared between binary and text so I can't change them independently.
Diffstat (limited to 'proto_text.c')
-rw-r--r-- | proto_text.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/proto_text.c b/proto_text.c index e33c204..f544a70 100644 --- a/proto_text.c +++ b/proto_text.c @@ -107,7 +107,7 @@ static void _finalize_mset(conn *c, enum store_item_type ret) { // We don't have the CAS until this point, which is why we // generate this line so late. META_CHAR(p, 'c'); - p = itoa_u64(ITEM_get_cas(it), p); + p = itoa_u64(c->cas, p); break; default: break; @@ -1408,6 +1408,8 @@ static void process_mset_command(conn *c, token_t *tokens, const size_t ntokens) // Set noreply after tokens are understood. c->noreply = of.no_reply; + // Clear cas return value + c->cas = 0; bool has_error = false; for (i = KEY_TOKEN+1; i < ntokens-1; i++) { |