X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/3d1391272aa46aa3a52a700f6b1ef0a47d4dcda9..395d663d29e6c3fe8fe7c9a3503b96c9bde211f3:/src/redis.c diff --git a/src/redis.c b/src/redis.c index 77dc174d..4d1da27c 100644 --- a/src/redis.c +++ b/src/redis.c @@ -393,7 +393,8 @@ int dictSdsKeyCompare(void *privdata, const void *key1, return memcmp(key1, key2, l1) == 0; } -/* A case insensitive version used for the command lookup table. */ +/* A case insensitive version used for the command lookup table and other + * places where case insensitive non binary-safe comparison is needed. */ int dictSdsKeyCaseCompare(void *privdata, const void *key1, const void *key2) { @@ -508,6 +509,16 @@ dictType dbDictType = { dictRedisObjectDestructor /* val destructor */ }; +/* server.lua_scripts sha (as sds string) -> scripts (as robj) cache. */ +dictType shaScriptObjectDictType = { + dictSdsCaseHash, /* hash function */ + NULL, /* key dup */ + NULL, /* val dup */ + dictSdsKeyCaseCompare, /* key compare */ + dictSdsDestructor, /* key destructor */ + dictRedisObjectDestructor /* val destructor */ +}; + /* Db->expires */ dictType keyptrDictType = { dictSdsHash, /* hash function */ @@ -1918,6 +1929,7 @@ sds genRedisInfoString(char *section) { "redis_version:%s\r\n" "redis_git_sha1:%s\r\n" "redis_git_dirty:%d\r\n" + "redis_build_id:%llx\r\n" "redis_mode:%s\r\n" "os:%s %s %s\r\n" "arch_bits:%d\r\n" @@ -1932,6 +1944,7 @@ sds genRedisInfoString(char *section) { REDIS_VERSION, redisGitSHA1(), strtol(redisGitDirty(),NULL,10) > 0, + redisBuildId(), mode, name.sysname, name.release, name.machine, server.arch_bits, @@ -2478,12 +2491,13 @@ void daemonize(void) { } void version() { - printf("Redis server v=%s sha=%s:%d malloc=%s bits=%d\n", + printf("Redis server v=%s sha=%s:%d malloc=%s bits=%d build=%llx\n", REDIS_VERSION, redisGitSHA1(), atoi(redisGitDirty()) > 0, ZMALLOC_LIB, - sizeof(long) == 4 ? 32 : 64); + sizeof(long) == 4 ? 32 : 64, + redisBuildId()); exit(0); }