提交 d070abe4 编写于 作者: A antirez

Fix for a possible bug related to ZINTER/UNIONSTORE called with the same...

Fix for a possible bug related to ZINTER/UNIONSTORE called with the same source set more than one time.
上级 dd1eefa4
......@@ -1521,7 +1521,10 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
score = src[0].weight * zval.score;
for (j = 1; j < setnum; j++) {
if (zuiFind(&src[j],&zval,&value)) {
if (src[j].subject == src[0].subject) {
value = zval.score*src[j].weight;
zunionInterAggregate(&score,value,aggregate);
} else if (zuiFind(&src[j],&zval,&value)) {
value *= src[j].weight;
zunionInterAggregate(&score,value,aggregate);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册