Let CONFIG GET * show both replicaof and its alias (#9395)

This commit is contained in:
Viktor Söderqvist 2021-08-22 04:43:18 +02:00 committed by GitHub
parent 492d8d0961
commit 8f59c1ecae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -1045,13 +1045,10 @@ void configGetCommand(client *c) {
addReplyBulkCString(c,buf);
matches++;
}
if (stringmatch(pattern,"slaveof",1) ||
stringmatch(pattern,"replicaof",1))
{
char *optname = stringmatch(pattern,"slaveof",1) ?
"slaveof" : "replicaof";
for (int i = 0; i < 2; i++) {
char *optname = i == 0 ? "replicaof" : "slaveof";
if (!stringmatch(pattern, optname, 1)) continue;
char buf[256];
addReplyBulkCString(c,optname);
if (server.masterhost)
snprintf(buf,sizeof(buf),"%s %d",

View File

@ -149,6 +149,7 @@ start_server {tags {"introspection"}} {
io-threads
logfile
unixsocketperm
replicaof
slaveof
requirepass
server_cpulist