MCPcopy Create free account
hub / github.com/F-Stack/f-stack / evalShaCommand

Function evalShaCommand

app/redis-6.2.6/src/scripting.c:1732–1750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1730}
1731
1732void evalShaCommand(client *c) {
1733 /* Explicitly feed monitor here so that lua commands appear after their
1734 * script command. */
1735 replicationFeedMonitors(c,server.monitors,c->db->id,c->argv,c->argc);
1736 if (sdslen(c->argv[1]->ptr) != 40) {
1737 /* We know that a match is not possible if the provided SHA is
1738 * not the right length. So we return an error ASAP, this way
1739 * evalGenericCommand() can be implemented without string length
1740 * sanity check */
1741 addReplyErrorObject(c, shared.noscripterr);
1742 return;
1743 }
1744 if (!(c->flags & CLIENT_LUA_DEBUG))
1745 evalGenericCommand(c,1);
1746 else {
1747 addReplyError(c,"Please use EVAL instead of EVALSHA for debugging");
1748 return;
1749 }
1750}
1751
1752void scriptCommand(client *c) {
1753 if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {

Callers

nothing calls this directly

Calls 5

replicationFeedMonitorsFunction · 0.85
sdslenFunction · 0.85
addReplyErrorObjectFunction · 0.85
evalGenericCommandFunction · 0.85
addReplyErrorFunction · 0.85

Tested by

no test coverage detected