mirror of
https://github.com/fluencelabs/redis
synced 2025-06-13 17:21:20 +00:00
Scripting: Fix regression from #1118
The new check-for-number behavior of Lua arguments broke users who use large strings of just integers. The Lua number check would convert the string to a number, but that breaks user data because Lua numbers have limited precision compared to an arbitrarily precise number wrapped in a string. Regression fixed and new test added. Fixes #1118 again.
This commit is contained in:
@ -347,6 +347,13 @@ start_server {tags {"scripting"}} {
|
||||
return redis.call("get","foo")
|
||||
} 0
|
||||
} {9007199254740991}
|
||||
|
||||
test {String containing number precision test (regression of issue #1118)} {
|
||||
r eval {
|
||||
redis.call("set", "key", "12039611435714932082")
|
||||
return redis.call("get", "key")
|
||||
} 0
|
||||
} {12039611435714932082}
|
||||
}
|
||||
|
||||
# Start a new server since the last test in this stanza will kill the
|
||||
|
Reference in New Issue
Block a user