Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
430719ca
Commit
430719ca
authored
May 13, 2011
by
antirez
Browse files
Fixed bug introduced with the copy-on-write friendly iteartor
parent
cc8a0f89
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_zset.c
View file @
430719ca
...
@@ -686,7 +686,18 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
...
@@ -686,7 +686,18 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
score
=
src
[
0
].
weight
*
zunionInterDictValue
(
de
);
score
=
src
[
0
].
weight
*
zunionInterDictValue
(
de
);
for
(
j
=
1
;
j
<
setnum
;
j
++
)
{
for
(
j
=
1
;
j
<
setnum
;
j
++
)
{
dictEntry
*
other
=
dictFind
(
src
[
j
].
dict
,
dictGetEntryKey
(
de
));
dictEntry
*
other
;
/* If it's the same dictionary don't lookup as we are not
* in the context of a safe iterator. It's the same
* dictionary so we are sure the element is inside.
* This happens on SINTERSTORE dest 2 mykey mykey. */
if
(
src
[
j
].
dict
==
src
[
0
].
dict
)
{
other
=
de
;
}
else
{
other
=
dictFind
(
src
[
j
].
dict
,
dictGetEntryKey
(
de
));
}
if
(
other
)
{
if
(
other
)
{
value
=
src
[
j
].
weight
*
zunionInterDictValue
(
other
);
value
=
src
[
j
].
weight
*
zunionInterDictValue
(
other
);
zunionInterAggregate
(
&
score
,
value
,
aggregate
);
zunionInterAggregate
(
&
score
,
value
,
aggregate
);
...
...
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