提交 5b864617 编写于 作者: A antirez

Cluster: make sortGetKeys() able to handle multiple STORE options.

It does not make sense to pass multiple store options, so, better to
handle it ;-)
上级 c4ef1d64
......@@ -1064,7 +1064,10 @@ int *sortGetKeys(struct redisCommand *cmd, robj **argv, int argc, int *numkeys)
i += skiplist[j].skip;
break;
} else if (!strcasecmp(argv[i]->ptr,"store") && i+1 < argc) {
keys[num++] = i+1; /* <store-key> */
/* Note: we don't increment "num" here and continue the loop
* to be sure to process the *last* "STORE" option if multiple
* ones are provided. This is same behavior as SORT. */
keys[num] = i+1; /* <store-key> */
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册