diff options
author | antirez <antirez@gmail.com> | 2011-06-14 17:19:25 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2011-06-14 17:19:25 +0200 |
commit | 5d919263042a899082570ec7084ddab8d07d65ac (patch) | |
tree | 1fc66597e2fe6268fd7cf9e5e44281711aa0222b | |
parent | 5afce9b6eaf294e5e11004897a00484925f3790c (diff) | |
download | redis-5d919263042a899082570ec7084ddab8d07d65ac.tar.gz |
Fix for issue 566, fixed in a more long term way into the 2.4 branch
-rw-r--r-- | src/sort.c | 1 | ||||
-rw-r--r-- | src/t_string.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/sort.c b/src/sort.c index a44a6d63b..cf188c699 100644 --- a/src/sort.c +++ b/src/sort.c @@ -363,6 +363,7 @@ void sortCommand(redisClient *c) { } } } + lookupKeyWrite(c->db,storekey); /* Force expire of old key if needed. */ dbReplace(c->db,storekey,sobj); /* Note: we add 1 because the DB is dirty anyway since even if the * SORT result is empty a new key is set and maybe the old content diff --git a/src/t_string.c b/src/t_string.c index b96198c8d..5539195a9 100644 --- a/src/t_string.c +++ b/src/t_string.c @@ -25,6 +25,7 @@ void setGenericCommand(redisClient *c, int nx, robj *key, robj *val, robj *expir } } + lookupKeyWrite(c->db,key); /* Force expire of old key if needed */ retval = dbAdd(c->db,key,val); if (retval == REDIS_ERR) { if (!nx) { |