From dd1eefa4f3c89177cbe4f2e98dbd8f409ff87bc6 Mon Sep 17 00:00:00 2001 From: antirez Date: Sun, 15 May 2011 12:15:54 +0200 Subject: [PATCH] Fixed SINTER[STORE] problem related to the new copy on write safe iterator --- src/t_set.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/t_set.c b/src/t_set.c index b221e2e9..be083c8b 100644 --- a/src/t_set.c +++ b/src/t_set.c @@ -437,6 +437,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 && -- 2.47.2