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
51a01ca8
Unverified
Commit
51a01ca8
authored
Jan 10, 2020
by
Salvatore Sanfilippo
Committed by
GitHub
Jan 10, 2020
Browse files
Merge pull request #6746 from leomurillo/unstable
Fix bug on KEYS command where pattern starts with * followed by \x00
parents
b8d315ff
63e46e5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/db.c
View file @
51a01ca8
...
@@ -602,7 +602,7 @@ void keysCommand(client *c) {
...
@@ -602,7 +602,7 @@ void keysCommand(client *c) {
void
*
replylen
=
addReplyDeferredLen
(
c
);
void
*
replylen
=
addReplyDeferredLen
(
c
);
di
=
dictGetSafeIterator
(
c
->
db
->
dict
);
di
=
dictGetSafeIterator
(
c
->
db
->
dict
);
allkeys
=
(
pattern
[
0
]
==
'*'
&&
p
attern
[
1
]
==
'\0'
);
allkeys
=
(
pattern
[
0
]
==
'*'
&&
p
len
==
1
);
while
((
de
=
dictNext
(
di
))
!=
NULL
)
{
while
((
de
=
dictNext
(
di
))
!=
NULL
)
{
sds
key
=
dictGetKey
(
de
);
sds
key
=
dictGetKey
(
de
);
robj
*
keyobj
;
robj
*
keyobj
;
...
...
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