]> git.saurik.com Git - redis.git/commitdiff
save ziplist encoded type as a different type id. Done as separated commit since...
authorantirez <antirez@gmail.com>
Mon, 28 Feb 2011 16:06:09 +0000 (17:06 +0100)
committerantirez <antirez@gmail.com>
Mon, 28 Feb 2011 16:06:09 +0000 (17:06 +0100)
src/rdb.c

index 60a70e01eb72f35b8d4e40739a2fb51ac56776fb..3749188973a74e0dc4971bc7b116ba79a9209288 100644 (file)
--- a/src/rdb.c
+++ b/src/rdb.c
@@ -406,6 +406,8 @@ int rdbSaveKeyValuePair(FILE *fp, robj *key, robj *val,
     vtype = val->type;
     if (vtype == REDIS_HASH && val->encoding == REDIS_ENCODING_ZIPMAP)
         vtype = REDIS_HASH_ZIPMAP;
+    else if (vtype == REDIS_LIST && val->encoding == REDIS_ENCODING_ZIPLIST)
+        vtype = REDIS_HASH_ZIPLIST;
     /* Save type, key, value */
     if (rdbSaveType(fp,vtype) == -1) return -1;
     if (rdbSaveStringObject(fp,key) == -1) return -1;