mirror of
https://github.com/fluencelabs/redis
synced 2025-06-14 09:41:21 +00:00
HDEL: Abort deleting fields when hash is removed
This commit is contained in:
@ -403,8 +403,11 @@ void hdelCommand(redisClient *c) {
|
||||
|
||||
for (j = 2; j < c->argc; j++) {
|
||||
if (hashTypeDelete(o,c->argv[j])) {
|
||||
if (hashTypeLength(o) == 0) dbDelete(c->db,c->argv[1]);
|
||||
deleted++;
|
||||
if (hashTypeLength(o) == 0) {
|
||||
dbDelete(c->db,c->argv[1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (deleted) {
|
||||
|
Reference in New Issue
Block a user