Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
5d919263
Commit
5d919263
authored
Jun 14, 2011
by
antirez
Browse files
Fix for issue 566, fixed in a more long term way into the 2.4 branch
parent
5afce9b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/sort.c
View file @
5d919263
...
@@ -363,6 +363,7 @@ void sortCommand(redisClient *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
);
dbReplace
(
c
->
db
,
storekey
,
sobj
);
/* Note: we add 1 because the DB is dirty anyway since even if the
/* 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
* SORT result is empty a new key is set and maybe the old content
...
...
src/t_string.c
View file @
5d919263
...
@@ -25,6 +25,7 @@ void setGenericCommand(redisClient *c, int nx, robj *key, robj *val, robj *expir
...
@@ -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
);
retval
=
dbAdd
(
c
->
db
,
key
,
val
);
if
(
retval
==
REDIS_ERR
)
{
if
(
retval
==
REDIS_ERR
)
{
if
(
!
nx
)
{
if
(
!
nx
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment