Skip to content
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.

Lua environmental differences #15

Closed
bmerry opened this issue Feb 19, 2018 · 1 comment
Closed

Lua environmental differences #15

bmerry opened this issue Feb 19, 2018 · 1 comment

Comments

@bmerry
Copy link

bmerry commented Feb 19, 2018

The Lua scripting support (EVAL) does not perfectly emulate the environment available to a real redis script. Some known differences are:

  • Libraries such as cjson are not loaded
  • Setting of global variables is only checked each time a redis function is called, rather than being enforced by a metatable.
  • dofile and readfile are not disabled.
  • Various functions on the redis object are not implemented e.g. redis.sha1hex, redis.log
  • It doesn't prevent mutating commands after a random command (this will be a major task since it requires knowing which commands are mutating and/or random).
  • The random seed might not be reset with every script (untested)

For more details see the redis documentation and [implementation(https://github.com/antirez/redis/blob/32ac4c64baf00747da1acc0cc61ee236922e2dcf/src/scripting.c#L867-L885).

@bmerry
Copy link
Author

bmerry commented Mar 23, 2018

Closing because development has moved back to fakeredis.

@bmerry bmerry closed this as completed Mar 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant