]> git.saurik.com Git - redis.git/commitdiff
Fixed SINTER[STORE] problem related to the new copy on write safe iterator
authorantirez <antirez@gmail.com>
Sun, 15 May 2011 10:15:54 +0000 (12:15 +0200)
committerantirez <antirez@gmail.com>
Sun, 15 May 2011 10:18:00 +0000 (12:18 +0200)
src/t_set.c

index b221e2e99cd129f7e385f00fc3783931bc97181b..be083c8b0a66346c03452c80478a85d806f7cb6d 100644 (file)
@@ -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++) {
     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 &&
             if (encoding == REDIS_ENCODING_INTSET) {
                 /* intset with intset is simple... and fast */
                 if (sets[j]->encoding == REDIS_ENCODING_INTSET &&