Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
492fd5c0
Commit
492fd5c0
authored
Oct 17, 2018
by
antirez
Browse files
Fix XGROUP CREATE MKSTREAM handling of .
parent
2e3d4033
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
492fd5c0
...
@@ -1751,14 +1751,19 @@ NULL
...
@@ -1751,14 +1751,19 @@ NULL
if (!strcasecmp(opt,"CREATE") && (c->argc == 5 || c->argc == 6)) {
if (!strcasecmp(opt,"CREATE") && (c->argc == 5 || c->argc == 6)) {
streamID id;
streamID id;
if (!strcmp(c->argv[4]->ptr,"$")) {
if (!strcmp(c->argv[4]->ptr,"$")) {
if (s) {
id = s->last_id;
id = s->last_id;
} else {
id.ms = 0;
id.seq = 0;
}
} else if (streamParseStrictIDOrReply(c,c->argv[4],&id,0) != C_OK) {
} else if (streamParseStrictIDOrReply(c,c->argv[4],&id,0) != C_OK) {
return;
return;
}
}
/* Handle the MKSTREAM option now that the command can no longer fail. */
/* Handle the MKSTREAM option now that the command can no longer fail. */
if (s == NULL && mkstream) {
if (s == NULL && mkstream) {
robj *
o = createStreamObject();
o = createStreamObject();
dbAdd(c->db,c->argv[2],o);
dbAdd(c->db,c->argv[2],o);
s = o->ptr;
s = o->ptr;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment