mirror of
https://github.com/fluencelabs/redis
synced 2025-06-23 22:11:33 +00:00
Fix key extraction for SORT
We only want to use the last STORE key, but we have to record we actually found a STORE key so we can increment the final return key count. Test added to prevent further regression. Closes #1883, #1645, #1647
This commit is contained in:
@ -95,6 +95,14 @@ start_server {
|
||||
assert_encoding ziplist sort-res
|
||||
}
|
||||
|
||||
test "SORT extracts STORE correctly" {
|
||||
r command getkeys sort abc store def
|
||||
} {abc def}
|
||||
|
||||
test "SORT extracts multiple STORE correctly" {
|
||||
r command getkeys sort abc store invalid store stillbad store def
|
||||
} {abc def}
|
||||
|
||||
test "SORT DESC" {
|
||||
assert_equal [lsort -decreasing -integer $result] [r sort tosort DESC]
|
||||
}
|
||||
|
Reference in New Issue
Block a user