Fix XGROUP CREATE MKSTREAM handling of .

This commit is contained in:
antirez 2018-10-17 12:10:52 +02:00
parent 2e3d403349
commit 492fd5c011

View File

@ -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;
}