Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
a8dca69b
Commit
a8dca69b
authored
Jun 13, 2010
by
Pieter Noordhuis
Browse files
use raw strings when loading a hash from the rdb into a zipmap
parent
f6475c72
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
a8dca69b
...
...
@@ -4258,10 +4258,16 @@ static robj *rdbLoadObject(int type, FILE *fp) {
if (o->encoding == REDIS_ENCODING_ZIPMAP) {
unsigned char *zm = o->ptr;
robj *deckey, *decval;
zm = zipmapSet(zm,key->ptr,sdslen(key->ptr),
val->ptr,sdslen(val->ptr),NULL);
/* We need raw string objects to add them to the zipmap */
deckey = getDecodedObject(key);
decval = getDecodedObject(val);
zm = zipmapSet(zm,deckey->ptr,sdslen(deckey->ptr),
decval->ptr,sdslen(decval->ptr),NULL);
o->ptr = zm;
decrRefCount(deckey);
decrRefCount(decval);
decrRefCount(key);
decrRefCount(val);
} else {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment