-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ZRANGE command should return an empty array when count = 0 (#1492)
Currently, ZRANGE will return all matched members if the count = 0 which is not consistent with the Redis behavior. For example: ```shell 127.0.0.1:6666> zadd zset11 1 a 2 b 3 c 4 d 5 e 6 f 7 g (integer) 7 127.0.0.1:6666> zrange zset11 0 6 byscore limit 0 0 ``` Redis will return an empty array: ```shell 127.0.0.1:6379> zadd zset11 1 a 2 b 3 c 4 d 5 e 6 f 7 g (integer) 7 127.0.0.1:6379> zrange zset11 0 6 byscore limit 0 0 (empty array) ``` But we got all matched members in ZSET: ```shell 127.0.0.1:6666> zrange zset11 0 6 byscore limit 0 0 1) "a" 2) "b" 3) "c" 4) "d" 5) "e" 6) "f" ```
- Loading branch information
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters