chnaghong1990 / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

used lua eval to telnet is eror #633

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
my Redis version is redis-2.2.111-scripting

[root@test ad]# telnet 127.0.0.1 6379   
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
get key
$5
value
eval "local ss = redis.call('get',KEYS[1]);return string.len(ss);" 1 one
-ERR value is not an integer or out of range
eval "return {(redis('hget',KEYS[1],KEYS[2])),(redis('hget',KEYS[1],KEYS[3]))}" 
3 hq val1 val2
-ERR value is not an integer or out of range

Original issue reported on code.google.com by lijinx...@gmail.com on 17 Aug 2011 at 7:35

GoogleCodeExporter commented 8 years ago
Single-line requests are split on whitespace. This means your call to EVAL 
results in a different set of arguments than you would expect. You can use 
redis-cli if you want to use quoted strings as argument.

Original comment by pcnoordh...@gmail.com on 18 Aug 2011 at 9:37