From fdcaae84d32e284a86cabddb4298c52a8e41a9f6 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 18 Dec 2009 07:13:13 -0500 Subject: [PATCH] Added a missing server.dirty increment in a non critical place, added more tests --- redis.c | 3 ++- test-redis.tcl | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/redis.c b/redis.c index dde1630d..459b25c4 100644 --- a/redis.c +++ b/redis.c @@ -3968,7 +3968,8 @@ static void sinterGenericCommand(redisClient *c, robj **setskeys, unsigned long if (!setobj) { zfree(dv); if (dstkey) { - deleteKey(c->db,dstkey); + if (deleteKey(c->db,dstkey)) + server.dirty++; addReply(c,shared.czero); } else { addReply(c,shared.nullmultibulk); diff --git a/test-redis.tcl b/test-redis.tcl index c61293fa..004dc696 100644 --- a/test-redis.tcl +++ b/test-redis.tcl @@ -530,6 +530,12 @@ proc main {server port} { list [$r lrange mylist 0 -1] [$r type newlist] [string range $err 0 2] } {{a b c d} string ERR} + test {RPOPLPUSH against non existing src key} { + $r del mylist + $r del newlist + $r rpoplpush mylist newlist + } {} + test {RENAME basic usage} { $r set mykey hello $r rename mykey mykey1 -- 2.45.2