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
0d36ded0
Commit
0d36ded0
authored
Dec 15, 2009
by
antirez
Browse files
Fixed issue #121
parent
fc77604c
Changes
2
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
0d36ded0
...
...
@@ -3961,7 +3961,7 @@ static void sinterGenericCommand(redisClient *c, robj **setskeys, unsigned long
zfree(dv);
if (dstkey) {
deleteKey(c->db,dstkey);
addReply(c,shared.o
k
);
addReply(c,shared.
czer
o);
} else {
addReply(c,shared.nullmultibulk);
}
...
...
test-redis.tcl
View file @
0d36ded0
...
...
@@ -52,6 +52,19 @@ proc zlistAlikeSort {a b} {
string compare
[
lindex $a 1
]
[
lindex $b 1
]
}
proc waitForBgsave r
{
while 1
{
set i
[
$r
info
]
if
{[
string match
{
*bgsave_in_progress:1*
}
$i
]}
{
puts -nonewline
"
\n
Waiting for background save to finish... "
flush stdout
after 1000
}
else
{
break
}
}
}
proc main
{
server port
}
{
set r
[
redis $server $port
]
$r select 9
...
...
@@ -633,16 +646,7 @@ proc main {server port} {
test
{
SAVE - make sure there are all the types as values
}
{
# Wait for a background saving in progress to terminate
while 1
{
set i
[
$r
info
]
if
{[
string match
{
*bgsave_in_progress:1*
}
$i
]}
{
puts -nonewline
"
\n
Waiting for background save to finish... "
flush stdout
after 100
}
else
{
break
}
}
waitForBgsave $r
$r lpush mysavelist hello
$r lpush mysavelist world
$r set myemptykey
{}
...
...
@@ -1210,6 +1214,16 @@ proc main {server port} {
}
{
0
}
}
test
{
BGSAVE
}
{
$r flushdb
$r save
$r set x 10
$r bgsave
waitForBgsave $r
$r debug reload
$r get x
}
{
10
}
# Leave the user with a clean DB before to exit
test
{
FLUSHDB
}
{
set aux
{}
...
...
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