summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-05-15 12:15:54 +0200
committerantirez <antirez@gmail.com>2011-05-15 12:15:54 +0200
commitb02e81be076735cc7ff5a25e9a25623b8d4e8377 (patch)
tree544e2102c03a9a2126c99e1a4bf225a3a4d0fc37
parent430719ca53dfe1cb6f5c0ecaa6db92e117c89e77 (diff)
downloadredis-b02e81be076735cc7ff5a25e9a25623b8d4e8377.tar.gz
Fixed SINTER[STORE] problem related to the new copy on write safe iterator
-rw-r--r--src/t_set.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/t_set.c b/src/t_set.c
index 9bff7c626..bffe873a9 100644
--- a/src/t_set.c
+++ b/src/t_set.c
@@ -433,6 +433,7 @@ void sinterGenericCommand(redisClient *c, robj **setkeys, unsigned long setnum,
si = setTypeInitIterator(sets[0]);
while((encoding = setTypeNext(si,&eleobj,&intobj)) != -1) {
for (j = 1; j < setnum; j++) {
+ if (sets[j] == sets[0]) continue;
if (encoding == REDIS_ENCODING_INTSET) {
/* intset with intset is simple... and fast */
if (sets[j]->encoding == REDIS_ENCODING_INTSET &&