Unverified Commit 91f3689b authored by Huang Zhw's avatar Huang Zhw Committed by GitHub
Browse files

XTRIM call streamParseAddOrTrimArgsOrReply use wrong arg xadd. (#9047)

xtrimCommand call streamParseAddOrTrimArgsOrReply should use xadd==0.

When the syntax is valid, it does not cause any bugs because the params of XADD is superset of XTRIM.
Just XTRIM will not respond with error on invalid syntax. The syntax of XADD will also be accpeted by XTRIM.
parent bb671d90
...@@ -3233,7 +3233,7 @@ void xtrimCommand(client *c) { ...@@ -3233,7 +3233,7 @@ void xtrimCommand(client *c) {
/* Argument parsing. */ /* Argument parsing. */
streamAddTrimArgs parsed_args; streamAddTrimArgs parsed_args;
if (streamParseAddOrTrimArgsOrReply(c, &parsed_args, 1) < 0) if (streamParseAddOrTrimArgsOrReply(c, &parsed_args, 0) < 0)
return; /* streamParseAddOrTrimArgsOrReply already replied. */ return; /* streamParseAddOrTrimArgsOrReply already replied. */
/* If the key does not exist, we are ok returning zero, that is, the /* If the key does not exist, we are ok returning zero, that is, the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment