mirror of
https://github.com/fluencelabs/redis
synced 2025-03-28 05:11:03 +00:00
CG: throw an error if XREADGROUP is used without GROUP.
This commit is contained in:
parent
d4f81ebdba
commit
8d8755c7b5
@ -1131,6 +1131,13 @@ void xreadCommand(client *c) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If the user specified XREADGROUP then it must also
|
||||||
|
* provide the GROUP option. */
|
||||||
|
if (xreadgroup && groupname == NULL) {
|
||||||
|
addReplyError(c,"Missing GROUP option for XREADGROUP");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Parse the IDs and resolve the group name. */
|
/* Parse the IDs and resolve the group name. */
|
||||||
if (streams_count > STREAMID_STATIC_VECTOR_LEN)
|
if (streams_count > STREAMID_STATIC_VECTOR_LEN)
|
||||||
ids = zmalloc(sizeof(streamID)*streams_count);
|
ids = zmalloc(sizeof(streamID)*streams_count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user