Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make INFO command reject cases with arguments greater than 2 #1570

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

enjoy-binbin
Copy link
Member

Passing info a b c is the same as passing plain info,
since we only checked that args_.size() == 2, by default it
will output all.

In this PR, we will reject args_.size() > 2 and return a
syntax error. This is consistent with Redis 6.2 behavior,
however, it is inconsistent with Redis 7.0, Redis 7.0 supports
passing info server clients ....

Because we don't plan to do such support for the time being,
we will first fix the parts that are obviously problematic.

Passing `info a b c` is the same as passing plain `info`,
since we only checked that args_.size() == 2, by default it
will output all.

In this PR, we will reject args_.size() > 2 and return a
syntax error. This is consistent with Redis 6.2 behavior,
however, it is inconsistent with Redis 7.0, Redis 7.0 supports
passing `info server clients ...`.

Because we don't plan to do such support for the time being,
we will first fix the parts that are obviously problematic.
@PragmaTwice PragmaTwice added fix and removed fix labels Jul 10, 2023
@PragmaTwice PragmaTwice changed the title Made INFO command reject cases with arguments greater than 2 Make INFO command reject cases with arguments greater than 2 Jul 10, 2023
@git-hulk git-hulk merged commit d839d16 into apache:unstable Jul 10, 2023
@enjoy-binbin enjoy-binbin deleted the info_synatx branch July 10, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants