From 71e145c48351cc69e489bea2b5a4b3365bbe82fb Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Sun, 16 Oct 2016 20:16:29 +0300 Subject: [PATCH] In sb_lua_new_state() always push a value on stack before calling lua_setglobal(). --- sysbench/scripting/script_lua.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysbench/scripting/script_lua.c b/sysbench/scripting/script_lua.c index 0a53de6..ebfe984 100644 --- a/sysbench/scripting/script_lua.c +++ b/sysbench/scripting/script_lua.c @@ -411,10 +411,12 @@ lua_State *sb_lua_new_state(const char *scriptname, int thread_id) break; case SB_ARG_TYPE_FILE: /* FIXME: no need to export anything */ + lua_pushnil(state); break; default: log_text(LOG_WARNING, "Global option '%s' will not be exported, because" " the type is unknown", opt->name); + lua_pushnil(state); break; }