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
8ea185ea
Commit
8ea185ea
authored
Sep 23, 2019
by
antirez
Browse files
redis-cli: AUTH can now have 3 arguments as well.
parent
bb7546c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
8ea185ea
...
@@ -1222,7 +1222,8 @@ static int cliSendCommand(int argc, char **argv, long repeat) {
...
@@ -1222,7 +1222,8 @@ static int cliSendCommand(int argc, char **argv, long repeat) {
if (!strcasecmp(command,"select") && argc == 2 && config.last_cmd_type != REDIS_REPLY_ERROR) {
if (!strcasecmp(command,"select") && argc == 2 && config.last_cmd_type != REDIS_REPLY_ERROR) {
config.dbnum = atoi(argv[1]);
config.dbnum = atoi(argv[1]);
cliRefreshPrompt();
cliRefreshPrompt();
} else if (!strcasecmp(command,"auth") && argc == 2) {
} else if (!strcasecmp(command,"auth") && (argc == 2 || argc == 3))
{
cliSelect();
cliSelect();
}
}
}
}
...
...
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