Commit d182820f authored by guybe7's avatar guybe7 Committed by Oran Agra
Browse files

Fix firstkey,lastkey,step in COMMAND command for some commands (#8367)

The output for COMMAND command was wrong for some commands.
clients can use firstkey,lastkey,step to find (some) key name arguments, and the
"movablekeys" flag to know that they can't know all (or any) of the key name arguments.

These commands had the wrong output:
1. GEORADIUS*_RO used to have "movablekeys" (which it doesn't really need)
2. XREAD and XREADGROUP used to have (1,1,1). but that's completely wrong.
3. Z*STORE used to have (0,0,0) but it can at lest give the index of the dstkey (1,1,1)

(cherry picked from commit baf92f3f)
parent 0c653428
...@@ -427,11 +427,11 @@ struct redisCommand redisCommandTable[] = { ...@@ -427,11 +427,11 @@ struct redisCommand redisCommandTable[] = {
{"zunionstore",zunionstoreCommand,-4, {"zunionstore",zunionstoreCommand,-4,
"write use-memory @sortedset", "write use-memory @sortedset",
0,zunionInterGetKeys,0,0,0,0,0,0}, 0,zunionInterGetKeys,1,1,1,0,0,0},
{"zinterstore",zinterstoreCommand,-4, {"zinterstore",zinterstoreCommand,-4,
"write use-memory @sortedset", "write use-memory @sortedset",
0,zunionInterGetKeys,0,0,0,0,0,0}, 0,zunionInterGetKeys,1,1,1,0,0,0},
{"zrange",zrangeCommand,-4, {"zrange",zrangeCommand,-4,
"read-only @sortedset", "read-only @sortedset",
...@@ -891,7 +891,7 @@ struct redisCommand redisCommandTable[] = { ...@@ -891,7 +891,7 @@ struct redisCommand redisCommandTable[] = {
{"georadius_ro",georadiusroCommand,-6, {"georadius_ro",georadiusroCommand,-6,
"read-only @geo", "read-only @geo",
0,georadiusGetKeys,1,1,1,0,0,0}, 0,NULL,1,1,1,0,0,0},
{"georadiusbymember",georadiusbymemberCommand,-5, {"georadiusbymember",georadiusbymemberCommand,-5,
"write use-memory @geo", "write use-memory @geo",
...@@ -899,7 +899,7 @@ struct redisCommand redisCommandTable[] = { ...@@ -899,7 +899,7 @@ struct redisCommand redisCommandTable[] = {
{"georadiusbymember_ro",georadiusbymemberroCommand,-5, {"georadiusbymember_ro",georadiusbymemberroCommand,-5,
"read-only @geo", "read-only @geo",
0,georadiusGetKeys,1,1,1,0,0,0}, 0,NULL,1,1,1,0,0,0},
{"geohash",geohashCommand,-2, {"geohash",geohashCommand,-2,
"read-only @geo", "read-only @geo",
...@@ -955,11 +955,11 @@ struct redisCommand redisCommandTable[] = { ...@@ -955,11 +955,11 @@ struct redisCommand redisCommandTable[] = {
{"xread",xreadCommand,-4, {"xread",xreadCommand,-4,
"read-only @stream @blocking", "read-only @stream @blocking",
0,xreadGetKeys,1,1,1,0,0,0}, 0,xreadGetKeys,0,0,0,0,0,0},
{"xreadgroup",xreadCommand,-7, {"xreadgroup",xreadCommand,-7,
"write @stream @blocking", "write @stream @blocking",
0,xreadGetKeys,1,1,1,0,0,0}, 0,xreadGetKeys,0,0,0,0,0,0},
{"xgroup",xgroupCommand,-2, {"xgroup",xgroupCommand,-2,
"write use-memory @stream", "write use-memory @stream",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment