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
d5a4c3e8
Commit
d5a4c3e8
authored
Aug 06, 2013
by
antirez
Browse files
redis-benchmark: fix db selection when :rand: feature is used.
parent
d2d3ac3f
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
d5a4c3e8
...
...
@@ -204,10 +204,16 @@ static void readHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
freeReplyObject
(
reply
);
if
(
c
->
selectlen
)
{
int
j
;
/* This is the OK from SELECT. Just discard the SELECT
* from the buffer. */
c
->
pending
--
;
sdsrange
(
c
->
obuf
,
c
->
selectlen
,
-
1
);
/* We also need to fix the pointers to the strings
* we need to randomize. */
for
(
j
=
0
;
j
<
c
->
randlen
;
j
++
)
c
->
randptr
[
j
]
-=
c
->
selectlen
;
c
->
selectlen
=
0
;
continue
;
}
...
...
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