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
a5d27d39
Commit
a5d27d39
authored
Dec 13, 2015
by
antirez
Browse files
Fix 3.0 merge issues with new MIGRATE.
parent
ea897338
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/db.c
View file @
a5d27d39
...
@@ -1133,7 +1133,7 @@ int *sortGetKeys(struct redisCommand *cmd, robj **argv, int argc, int *numkeys)
...
@@ -1133,7 +1133,7 @@ int *sortGetKeys(struct redisCommand *cmd, robj **argv, int argc, int *numkeys)
int
*
migrateGetKeys
(
struct
redisCommand
*
cmd
,
robj
**
argv
,
int
argc
,
int
*
numkeys
)
{
int
*
migrateGetKeys
(
struct
redisCommand
*
cmd
,
robj
**
argv
,
int
argc
,
int
*
numkeys
)
{
int
i
,
num
,
first
,
*
keys
;
int
i
,
num
,
first
,
*
keys
;
UN
USED
(
cmd
);
REDIS_NOT
USED
(
cmd
);
/* Assume the obvious form. */
/* Assume the obvious form. */
first
=
3
;
first
=
3
;
...
...
src/networking.c
View file @
a5d27d39
...
@@ -1527,6 +1527,16 @@ void rewriteClientCommandVector(redisClient *c, int argc, ...) {
...
@@ -1527,6 +1527,16 @@ void rewriteClientCommandVector(redisClient *c, int argc, ...) {
va_end
(
ap
);
va_end
(
ap
);
}
}
/* Completely replace the client command vector with the provided one. */
void
replaceClientCommandVector
(
redisClient
*
c
,
int
argc
,
robj
**
argv
)
{
freeClientArgv
(
c
);
zfree
(
c
->
argv
);
c
->
argv
=
argv
;
c
->
argc
=
argc
;
c
->
cmd
=
lookupCommandOrOriginal
(
c
->
argv
[
0
]
->
ptr
);
redisAssertWithInfo
(
c
,
NULL
,
c
->
cmd
!=
NULL
);
}
/* Rewrite a single item in the command vector.
/* Rewrite a single item in the command vector.
* The new val ref count is incremented, and the old decremented.
* The new val ref count is incremented, and the old decremented.
*
*
...
...
src/redis.h
View file @
a5d27d39
...
@@ -1071,6 +1071,7 @@ sds catClientInfoString(sds s, redisClient *client);
...
@@ -1071,6 +1071,7 @@ sds catClientInfoString(sds s, redisClient *client);
sds
getAllClientsInfoString
(
void
);
sds
getAllClientsInfoString
(
void
);
void
rewriteClientCommandVector
(
redisClient
*
c
,
int
argc
,
...);
void
rewriteClientCommandVector
(
redisClient
*
c
,
int
argc
,
...);
void
rewriteClientCommandArgument
(
redisClient
*
c
,
int
i
,
robj
*
newval
);
void
rewriteClientCommandArgument
(
redisClient
*
c
,
int
i
,
robj
*
newval
);
void
replaceClientCommandVector
(
redisClient
*
c
,
int
argc
,
robj
**
argv
);
unsigned
long
getClientOutputBufferMemoryUsage
(
redisClient
*
c
);
unsigned
long
getClientOutputBufferMemoryUsage
(
redisClient
*
c
);
void
freeClientsInAsyncFreeQueue
(
void
);
void
freeClientsInAsyncFreeQueue
(
void
);
void
asyncCloseClientOnOutputBufferLimitReached
(
redisClient
*
c
);
void
asyncCloseClientOnOutputBufferLimitReached
(
redisClient
*
c
);
...
...
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