mirror of
https://github.com/fluencelabs/redis
synced 2025-06-13 01:01:22 +00:00
uphold the smove contract to return 0 when the element is not a member of the source set, even if source=dest
This commit is contained in:
committed by
antirez
parent
bea224308b
commit
19382c8be6
@ -321,7 +321,10 @@ void smoveCommand(redisClient *c) {
|
||||
|
||||
/* If srcset and dstset are equal, SMOVE is a no-op */
|
||||
if (srcset == dstset) {
|
||||
addReply(c,shared.cone);
|
||||
if (setTypeIsMember(srcset,ele))
|
||||
addReply(c,shared.cone);
|
||||
else
|
||||
addReply(c,shared.czero);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user