X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/6c29410117b100b13764280bb3c58604b769c4fc..a0bf8d0ad8a6f4414194bc8ec7d067664bd321c2:/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); }