Unverified Commit d52ce4ea authored by Pierre Jambet's avatar Pierre Jambet Committed by GitHub
Browse files

Fix error message for the DEBUG ZIPLIST command (#7745)

DEBUG ZIPLIST <key> currently returns the following error string if the
key is not a ziplist: "ERR Not an sds encoded string.". This looks like
an accidental copy/paste error from the error returned in the else if
branch above where this string is returned if the key is not an sds
string. The command was added in
ac61f906 and looking at the commit,
nothing indicates that it is not an accidental typo.

The error string now returns a correct error: "Not a ziplist encoded
object", which accurately describes the error.
parent 8b0747d6
...@@ -588,7 +588,7 @@ NULL ...@@ -588,7 +588,7 @@ NULL
== NULL) return; == NULL) return;
if (o->encoding != OBJ_ENCODING_ZIPLIST) { if (o->encoding != OBJ_ENCODING_ZIPLIST) {
addReplyError(c,"Not an sds encoded string."); addReplyError(c,"Not a ziplist encoded object.");
} else { } else {
ziplistRepr(o->ptr); ziplistRepr(o->ptr);
addReplyStatus(c,"Ziplist structure printed on stdout"); addReplyStatus(c,"Ziplist structure printed on stdout");
......
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