mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Streams: return an error message if using xreadgroup with '$' ID.
Redis will always return an empty result when '$' ID is specified with xreadgroup command, it's meaningless.
This commit is contained in:
parent
103c5a1a3c
commit
6501b6bb6d
@ -1351,6 +1351,11 @@ void xreadCommand(client *c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(c->argv[i]->ptr,"$") == 0) {
|
if (strcmp(c->argv[i]->ptr,"$") == 0) {
|
||||||
|
if (xreadgroup) {
|
||||||
|
addReplyError(c,"The $ ID can be specified only when calling "
|
||||||
|
"XREAD without GROUP option.");
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
if (o) {
|
if (o) {
|
||||||
stream *s = o->ptr;
|
stream *s = o->ptr;
|
||||||
ids[id_idx] = s->last_id;
|
ids[id_idx] = s->last_id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user