Commit b785b2bf authored by antirez's avatar antirez
Browse files

encode integers while loading an hash

parent 65cc7665
...@@ -4240,8 +4240,8 @@ static robj *rdbLoadObject(int type, FILE *fp) { ...@@ -4240,8 +4240,8 @@ static robj *rdbLoadObject(int type, FILE *fp) {
while(hashlen--) { while(hashlen--) {
robj *key, *val; robj *key, *val;
if ((key = rdbLoadStringObject(fp)) == NULL) return NULL; if ((key = rdbLoadEncodedStringObject(fp)) == NULL) return NULL;
if ((val = rdbLoadStringObject(fp)) == NULL) return NULL; if ((val = rdbLoadEncodedStringObject(fp)) == NULL) return NULL;
/* If we are using a zipmap and there are too big values /* If we are using a zipmap and there are too big values
* the object is converted to real hash table encoding. */ * the object is converted to real hash table encoding. */
if (o->encoding != REDIS_ENCODING_HT && if (o->encoding != REDIS_ENCODING_HT &&
......
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