diff options
author | Oran Agra <oran@redislabs.com> | 2022-05-09 13:37:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-09 13:37:49 +0300 |
commit | 2bcd890d8aa645cab0d8fd0ed765c52a997de4f5 (patch) | |
tree | 85d2602858f6bb1538626d7fbcf7a58bb28d41f2 /src/config.c | |
parent | eb915a82a5f4d7fd6c36ad1710b35e2b0c2abd31 (diff) | |
download | redis-2bcd890d8aa645cab0d8fd0ed765c52a997de4f5.tar.gz |
Fix --save command line regression in redis 7.0.0 (#10690)
Unintentional change in #9644 (since RC1) meant that an empty `--save ""` config
from command line, wouldn't have clear any setting from the config file
Added tests to cover that, and improved test infra to take additional
command line args for redis-server
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index f7252ca6e..04f0dbcd8 100644 --- a/src/config.c +++ b/src/config.c @@ -2595,8 +2595,10 @@ static int setConfigSaveOption(standardConfig *config, sds *argv, int argc, cons int j; /* Special case: treat single arg "" as zero args indicating empty save configuration */ - if (argc == 1 && !strcasecmp(argv[0],"")) + if (argc == 1 && !strcasecmp(argv[0],"")) { + resetServerSaveParams(); argc = 0; + } /* Perform sanity check before setting the new config: * - Even number of args |