YuriBro
YuriBro

Reputation: 902

lua redis.call(...) differs from the same call in redis

Consider code:

redis> RPUSH test 1
(integer) 1
redis> RPUSH test 2
(integer) 2
redis> RPUSH test 19
(integer) 3
redis> RPUSH test 20
(integer) 4
redis> RPUSH test 3
(integer) 5
redis> SORT test BY nosort
1) "1"
2) "2"
3) "19"
4) "20"
5) "3"
redis 127.0.0.1:6379> eval "return redis.call('SORT', 'test', 'BY', 'nosort')" 0
1) "1"
2) "19"
3) "2"
4) "20"
5) "3"
redis 127.0.0.1:6379>

The same action, but lua returns list with corrupted sort order. Is it a bug?

I use redis-2.6.0-rc7

Upvotes: 2

Views: 367

Answers (1)

catwell
catwell

Reputation: 7048

Yes, it is a bug, and it is fixed in Git trunk.

Upvotes: 3

Related Questions