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
2ed22c8b
Commit
2ed22c8b
authored
Oct 17, 2009
by
antirez
Browse files
MSET fixed, was not able to replace keys already set for a stupid bug
parent
8d0490e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
2ed22c8b
...
...
@@ -4128,9 +4128,16 @@ static void msetGenericCommand(redisClient *c, int nx) {
}
for
(
j
=
1
;
j
<
c
->
argc
;
j
+=
2
)
{
dictAdd
(
c
->
db
->
dict
,
c
->
argv
[
j
],
c
->
argv
[
j
+
1
]);
incrRefCount
(
c
->
argv
[
j
]);
incrRefCount
(
c
->
argv
[
j
+
1
]);
int
retval
;
retval
=
dictAdd
(
c
->
db
->
dict
,
c
->
argv
[
j
],
c
->
argv
[
j
+
1
]);
if
(
retval
==
DICT_ERR
)
{
dictReplace
(
c
->
db
->
dict
,
c
->
argv
[
j
],
c
->
argv
[
j
+
1
]);
incrRefCount
(
c
->
argv
[
j
+
1
]);
}
else
{
incrRefCount
(
c
->
argv
[
j
]);
incrRefCount
(
c
->
argv
[
j
+
1
]);
}
removeExpire
(
c
->
db
,
c
->
argv
[
j
]);
}
server
.
dirty
+=
(
c
->
argc
-
1
)
/
2
;
...
...
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