Skip to content

Commit

Permalink
Add no-multi no-script flags to SHUTDOWN command
Browse files Browse the repository at this point in the history
It makes no sense to execute SHUTDOWN in multi or script.
This also matches the behavior of redis.
  • Loading branch information
enjoy-binbin committed Dec 19, 2023
1 parent 64e7834 commit 8a5bbef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/cmd_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ REDIS_REGISTER_COMMANDS(MakeCmdAttr<CommandAuth>("auth", 2, "read-only ok-loadin
MakeCmdAttr<CommandPerfLog>("perflog", -2, "read-only", 0, 0, 0),
MakeCmdAttr<CommandClient>("client", -2, "read-only", 0, 0, 0),
MakeCmdAttr<CommandMonitor>("monitor", 1, "read-only no-multi", 0, 0, 0),
MakeCmdAttr<CommandShutdown>("shutdown", 1, "read-only", 0, 0, 0),
MakeCmdAttr<CommandShutdown>("shutdown", 1, "read-only no-multi no-script", 0, 0, 0),
MakeCmdAttr<CommandQuit>("quit", 1, "read-only", 0, 0, 0),
MakeCmdAttr<CommandScan>("scan", -2, "read-only", 0, 0, 0),
MakeCmdAttr<CommandRandomKey>("randomkey", 1, "read-only", 0, 0, 0),
Expand Down

0 comments on commit 8a5bbef

Please sign in to comment.