mirror of
https://github.com/fluencelabs/redis
synced 2025-06-18 03:31:21 +00:00
SORT with STORE removes key if result is empty. This fixes issue #227.
This commit is contained in:
@ -367,9 +367,14 @@ void sortCommand(redisClient *c) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (outputlen) setKey(c->db,storekey,sobj);
|
||||
if (outputlen) {
|
||||
setKey(c->db,storekey,sobj);
|
||||
server.dirty += outputlen;
|
||||
} else if (dbDelete(c->db,storekey)) {
|
||||
signalModifiedKey(c->db,storekey);
|
||||
server.dirty++;
|
||||
}
|
||||
decrRefCount(sobj);
|
||||
server.dirty += outputlen;
|
||||
addReplyLongLong(c,outputlen);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user