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
bf0da617
Commit
bf0da617
authored
Mar 18, 2010
by
antirez
Browse files
reverted an optimization that makes Redis not stable
parent
288799e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
bf0da617
...
@@ -1005,9 +1005,11 @@ static int dictEncObjKeyCompare(void *privdata, const void *key1,
...
@@ -1005,9 +1005,11 @@ static int dictEncObjKeyCompare(void *privdata, const void *key1,
robj
*
o1
=
(
robj
*
)
key1
,
*
o2
=
(
robj
*
)
key2
;
robj
*
o1
=
(
robj
*
)
key1
,
*
o2
=
(
robj
*
)
key2
;
int
cmp
;
int
cmp
;
#if 0
if (o1->encoding == REDIS_ENCODING_INT &&
if (o1->encoding == REDIS_ENCODING_INT &&
o2->encoding == REDIS_ENCODING_INT &&
o2->encoding == REDIS_ENCODING_INT &&
o1->ptr == o2->ptr) return 0;
o1->ptr == o2->ptr) return 0;
#endif
o1
=
getDecodedObject
(
o1
);
o1
=
getDecodedObject
(
o1
);
o2
=
getDecodedObject
(
o2
);
o2
=
getDecodedObject
(
o2
);
...
...
test-redis.tcl
View file @
bf0da617
...
@@ -1763,7 +1763,6 @@ proc main {server port} {
...
@@ -1763,7 +1763,6 @@ proc main {server port} {
set rank
[
$r
zrank myzset $ele
]
set rank
[
$r
zrank myzset $ele
]
if
{
$rank
!= $index
}
{
if
{
$rank
!= $index
}
{
set err
"
$ele
RANK is wrong! (
$rank
!=
$index
)"
set err
"
$ele
RANK is wrong! (
$rank
!=
$index
)"
exit
break
break
}
}
}
}
...
...
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