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
3cd36a4d
Commit
3cd36a4d
authored
Dec 11, 2014
by
antirez
Browse files
SORT: Don't sort Set elements if not needed.
Related to #2094.
parent
c50693d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sort.c
View file @
3cd36a4d
...
...
@@ -291,7 +291,9 @@ void sortCommand(redisClient *c) {
* The other types (list, sorted set) will retain their native order
* even if no sort order is requested, so they remain stable across
* scripting and replication. */
if
((
dontsort
&&
sortval
->
type
==
REDIS_SET
))
if
(
dontsort
&&
sortval
->
type
==
REDIS_SET
&&
(
storekey
||
c
->
flags
&
REDIS_LUA_CLIENT
))
{
/* Force ALPHA sorting */
dontsort
=
0
;
...
...
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