Added a missing server.dirty increment in a non critical place, added more tests

This commit is contained in:
antirez 2009-12-18 07:13:13 -05:00
parent c632369b52
commit fdcaae84d3
2 changed files with 8 additions and 1 deletions

View File

@ -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);

View File

@ -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