mirror of
https://github.com/fluencelabs/redis
synced 2025-06-23 05:51:34 +00:00
Stop access to global vars. Not configurable.
After considering the interaction between ability to delcare globals in scripts using the 'global' function, and the complexities related to hanlding replication and AOF in a sane way with globals AND ability to turn protection On and Off, we reconsidered the design. The new design makes clear that there is only one good way to write Redis scripts, that is not using globals. In the rare cases state must be retained across calls a Redis key can be used.
This commit is contained in:
@ -585,7 +585,6 @@ struct redisServer {
|
||||
int lua_timedout; /* True if we reached the time limit for script
|
||||
execution. */
|
||||
int lua_kill; /* Kill the script if true. */
|
||||
int lua_protect_globals; /* If true globals must be declared */
|
||||
/* Assert & bug reportign */
|
||||
char *assert_failed;
|
||||
char *assert_file;
|
||||
@ -961,8 +960,6 @@ int *zunionInterGetKeys(struct redisCommand *cmd,robj **argv, int argc, int *num
|
||||
|
||||
/* Scripting */
|
||||
void scriptingInit(void);
|
||||
void scriptingEnableGlobalsProtection(lua_State *lua);
|
||||
void scriptingDisableGlobalsProtection(lua_State *lua);
|
||||
|
||||
/* Git SHA1 */
|
||||
char *redisGitSHA1(void);
|
||||
|
Reference in New Issue
Block a user