summaryrefslogtreecommitdiff
path: root/src/t_set.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-05-15 12:15:54 +0200
committerantirez <antirez@gmail.com>2011-05-15 12:18:00 +0200
commitdd1eefa4f3c89177cbe4f2e98dbd8f409ff87bc6 (patch)
treee9429a5f31bf6a816f6d365645e58bc5e3227852 /src/t_set.c
parent70bc5f7724364e93c63865c02d517bc0164274d9 (diff)
downloadredis-dd1eefa4f3c89177cbe4f2e98dbd8f409ff87bc6.tar.gz
Fixed SINTER[STORE] problem related to the new copy on write safe iterator
Diffstat (limited to 'src/t_set.c')
-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 b221e2e99..be083c8b0 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 &&