Commit c7d7d0a8 authored by antirez's avatar antirez
Browse files

RDB version is no 4, because small hashes are now encoded as ziplists, so...

RDB version is no 4, because small hashes are now encoded as ziplists, so older versions of Redis will not understand this format.
parent 87faf906
......@@ -616,7 +616,7 @@ int rdbSave(char *filename) {
}
rioInitWithFile(&rdb,fp);
if (rdbWriteRaw(&rdb,"REDIS0003",9) == -1) goto werr;
if (rdbWriteRaw(&rdb,"REDIS0004",9) == -1) goto werr;
for (j = 0; j < server.dbnum; j++) {
redisDb *db = server.db+j;
......@@ -1023,7 +1023,7 @@ int rdbLoad(char *filename) {
return REDIS_ERR;
}
rdbver = atoi(buf+5);
if (rdbver < 1 || rdbver > 3) {
if (rdbver < 1 || rdbver > 4) {
fclose(fp);
redisLog(REDIS_WARNING,"Can't handle RDB format version %d",rdbver);
errno = EINVAL;
......
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