EVALSHA is now case insensitive.

EVALSHA used to crash if the SHA1 was not lowercase (Issue #783).
Fixed using a case insensitive dictionary type for the sha -> script
map used for replication of scripts.
This commit is contained in:
antirez
2012-11-22 15:50:00 +01:00
parent cceb0c5b4a
commit 95f68f7b0f
4 changed files with 18 additions and 2 deletions

View File

@ -532,7 +532,7 @@ void scriptingInit(void) {
/* Initialize a dictionary we use to map SHAs to scripts.
* This is useful for replication, as we need to replicate EVALSHA
* as EVAL, so we need to remember the associated script. */
server.lua_scripts = dictCreate(&dbDictType,NULL);
server.lua_scripts = dictCreate(&shaScriptObjectDictType,NULL);
/* Register the redis commands table and fields */
lua_newtable(lua);