robj *o1 = (robj*) key1, *o2 = (robj*) key2;
int cmp;
+ if (o1->encoding == REDIS_ENCODING_INT &&
+ o2->encoding == REDIS_ENCODING_INT &&
+ o1->ptr == o2->ptr) return 1;
+
o1 = getDecodedObject(o1);
o2 = getDecodedObject(o2);
cmp = sdsDictKeyCompare(privdata,o1->ptr,o2->ptr);
checkType(c,o,REDIS_HASH)) return;
if (o->encoding == REDIS_ENCODING_ZIPMAP) {
+ robj *field = getDecodedObject(c->argv[2]);
+
o->ptr = zipmapDel((unsigned char*) o->ptr,
- (unsigned char*) c->argv[2]->ptr,
- sdslen(c->argv[2]->ptr), &deleted);
+ (unsigned char*) field->ptr,
+ sdslen(field->ptr), &deleted);
+ decrRefCount(field);
} else {
deleted = dictDelete((dict*)o->ptr,c->argv[2]) == DICT_OK;
}