X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/d334281c802bc94e99475557ed341d356af0ab54..824ea0177f19218d925feefbfe836718c46351d5:/src/sort.c diff --git a/src/sort.c b/src/sort.c index 7e50582e..038aec27 100644 --- a/src/sort.c +++ b/src/sort.c @@ -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); }