From 5faa6025f52e4ee8443a111cbb42a775a0206396 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 10 Apr 2009 13:43:41 +0200 Subject: [PATCH] SINTER/SINTERSTORE/SLEMENTS fix: misisng keys are now not errors, but just like empty sets --- TODO | 1 + redis.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 32533ccf..5d565e99 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,6 @@ BEFORE REDIS 1.0.0-rc1 +- Fix INCRBY argument that is limited to 32bit int. - Add a new field as INFO output: bgsaveinprogress - Remove max number of args limit - GETSET diff --git a/redis.c b/redis.c index 05a623d5..1adfc8b3 100644 --- a/redis.c +++ b/redis.c @@ -2826,7 +2826,12 @@ static void sinterGenericCommand(redisClient *c, robj **setskeys, int setsnum, r lookupKeyRead(c->db,setskeys[j]); if (!setobj) { zfree(dv); - addReply(c,shared.nokeyerr); + if (dstkey) { + deleteKey(c->db,dstkey); + addReply(c,shared.ok); + } else { + addReply(c,shared.nullmultibulk); + } return; } if (setobj->type != REDIS_SET) { -- 2.45.2