mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Fix XGROUP CREATE MKSTREAM handling of .
This commit is contained in:
parent
2e3d403349
commit
492fd5c011
@ -1751,14 +1751,19 @@ NULL
|
||||
if (!strcasecmp(opt,"CREATE") && (c->argc == 5 || c->argc == 6)) {
|
||||
streamID id;
|
||||
if (!strcmp(c->argv[4]->ptr,"$")) {
|
||||
id = s->last_id;
|
||||
if (s) {
|
||||
id = s->last_id;
|
||||
} else {
|
||||
id.ms = 0;
|
||||
id.seq = 0;
|
||||
}
|
||||
} else if (streamParseStrictIDOrReply(c,c->argv[4],&id,0) != C_OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Handle the MKSTREAM option now that the command can no longer fail. */
|
||||
if (s == NULL && mkstream) {
|
||||
robj *o = createStreamObject();
|
||||
o = createStreamObject();
|
||||
dbAdd(c->db,c->argv[2],o);
|
||||
s = o->ptr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user