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
9dfd9d14
Commit
9dfd9d14
authored
Jul 01, 2016
by
sskorgal
Committed by
GitHub
Jul 01, 2016
Browse files
Fix for redis_cli printing default DB when select command fails.
parent
24bd9b19
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
9dfd9d14
...
...
@@ -916,7 +916,7 @@ static int cliSendCommand(int argc, char **argv, int repeat) {
return
REDIS_ERR
;
}
else
{
/* Store database number when SELECT was successfully executed. */
if
(
!
strcasecmp
(
command
,
"select"
)
&&
argc
==
2
)
{
if
(
!
strcasecmp
(
command
,
"select"
)
&&
argc
==
2
&&
config
.
last_cmd_type
!=
REDIS_REPLY_ERROR
)
{
config
.
dbnum
=
atoi
(
argv
[
1
]);
cliRefreshPrompt
();
}
else
if
(
!
strcasecmp
(
command
,
"auth"
)
&&
argc
==
2
)
{
...
...
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