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
e4f6b8c3
Commit
e4f6b8c3
authored
May 25, 2011
by
antirez
Browse files
Merge branch 'unstable'
parents
38a154a9
efc34087
Changes
6
Show whitespace changes
Inline
Side-by-side
src/pubsub.c
View file @
e4f6b8c3
...
@@ -141,7 +141,7 @@ int pubsubUnsubscribePattern(redisClient *c, robj *pattern, int notify) {
...
@@ -141,7 +141,7 @@ int pubsubUnsubscribePattern(redisClient *c, robj *pattern, int notify) {
/* Unsubscribe from all the channels. Return the number of channels the
/* Unsubscribe from all the channels. Return the number of channels the
* client was subscribed from. */
* client was subscribed from. */
int
pubsubUnsubscribeAllChannels
(
redisClient
*
c
,
int
notify
)
{
int
pubsubUnsubscribeAllChannels
(
redisClient
*
c
,
int
notify
)
{
dictIterator
*
di
=
dictGetIterator
(
c
->
pubsub_channels
);
dictIterator
*
di
=
dictGet
Safe
Iterator
(
c
->
pubsub_channels
);
dictEntry
*
de
;
dictEntry
*
de
;
int
count
=
0
;
int
count
=
0
;
...
...
src/t_zset.c
View file @
e4f6b8c3
...
@@ -1521,7 +1521,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
...
@@ -1521,7 +1521,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
score
=
src
[
0
].
weight
*
zval
.
score
;
score
=
src
[
0
].
weight
*
zval
.
score
;
for
(
j
=
1
;
j
<
setnum
;
j
++
)
{
for
(
j
=
1
;
j
<
setnum
;
j
++
)
{
/* It is not safe to access the
hash we
zset we are
/* It is not safe to access the zset we are
* iterating, so explicitly check for equal object. */
* iterating, so explicitly check for equal object. */
if
(
src
[
j
].
subject
==
src
[
0
].
subject
)
{
if
(
src
[
j
].
subject
==
src
[
0
].
subject
)
{
value
=
zval
.
score
*
src
[
j
].
weight
;
value
=
zval
.
score
*
src
[
j
].
weight
;
...
@@ -1566,7 +1566,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
...
@@ -1566,7 +1566,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
/* Because the inputs are sorted by size, it's only possible
/* Because the inputs are sorted by size, it's only possible
* for sets at larger indices to hold this element. */
* for sets at larger indices to hold this element. */
for
(
j
=
(
i
+
1
);
j
<
setnum
;
j
++
)
{
for
(
j
=
(
i
+
1
);
j
<
setnum
;
j
++
)
{
/* It is not safe to access the
hash we
zset we are
/* It is not safe to access the zset we are
* iterating, so explicitly check for equal object. */
* iterating, so explicitly check for equal object. */
if
(
src
[
j
].
subject
==
src
[
i
].
subject
)
{
if
(
src
[
j
].
subject
==
src
[
i
].
subject
)
{
value
=
zval
.
score
*
src
[
j
].
weight
;
value
=
zval
.
score
*
src
[
j
].
weight
;
...
...
src/util.c
View file @
e4f6b8c3
#include "fmacros.h"
#include <stdlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <ctype.h>
#include <ctype.h>
#include <limits.h>
#include <limits.h>
#include <math.h>
#include <math.h>
#include "util.h"
#include "util.h"
/* Glob-style pattern matching. */
/* Glob-style pattern matching. */
...
...
tests/integration/replication.tcl
View file @
e4f6b8c3
...
@@ -28,7 +28,7 @@ start_server {tags {"repl"}} {
...
@@ -28,7 +28,7 @@ start_server {tags {"repl"}} {
createComplexDataset r 50000 useexpire
createComplexDataset r 50000 useexpire
after 4000
;
# Make sure everything expired before taking the digest
after 4000
;
# Make sure everything expired before taking the digest
r keys *
;
# Force DEL syntesizing to slave
r keys *
;
# Force DEL syntesizing to slave
after 1000
;
# Wait another second. Now everything should be fi
l
e.
after 1000
;
# Wait another second. Now everything should be fi
n
e.
if
{[
r debug digest
]
ne
[
r -1 debug digest
]}
{
if
{[
r debug digest
]
ne
[
r -1 debug digest
]}
{
set csv1
[
csvdump r
]
set csv1
[
csvdump r
]
set csv2
[
csvdump
{
r -1
}]
set csv2
[
csvdump
{
r -1
}]
...
...
tests/test_helper.tcl
View file @
e4f6b8c3
...
@@ -110,6 +110,7 @@ proc cleanup {} {
...
@@ -110,6 +110,7 @@ proc cleanup {} {
}
}
proc execute_everything
{}
{
proc execute_everything
{}
{
execute_tests
"unit/printver"
execute_tests
"unit/auth"
execute_tests
"unit/auth"
execute_tests
"unit/protocol"
execute_tests
"unit/protocol"
execute_tests
"unit/basic"
execute_tests
"unit/basic"
...
...
tests/unit/printver.tcl
0 → 100644
View file @
e4f6b8c3
start_server
{}
{
set i
[
r info
]
regexp
{
redis_version:
(
.*?
)
\r\n
}
$i - version
regexp
{
redis_git_sha1:
(
.*?
)
\r\n
}
$i - sha1
puts
"Testing Redis version
$version
(
$sha1
)"
}
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