From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [94.100.177.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id E92B14696C8 for ; Tue, 21 Apr 2020 17:02:54 +0300 (MSK) From: sergeyb@tarantool.org Date: Tue, 21 Apr 2020 17:00:25 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v4 8/10] schema: fix internal symbols dangling in _G List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, v.shpilevoy@tarantool.org Cc: o.piskunov@tarantool.org From: Vladislav Shpilevoy A couple of functions were mistakenly declared as 'function' instead of 'local function' in schema.lua. That led to their presence in the global namespace. --- src/box/lua/schema.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/box/lua/schema.lua b/src/box/lua/schema.lua index 0beb66510..4d0451848 100644 --- a/src/box/lua/schema.lua +++ b/src/box/lua/schema.lua @@ -350,7 +350,7 @@ end -- box.commit yields, so it's defined as Lua/C binding -- box.rollback and box.rollback_to_savepoint yields as well -function update_format(format) +local function update_format(format) local result = {} for i, given in ipairs(format) do local field = {} @@ -2639,7 +2639,7 @@ box.schema.role.drop = function(name, opts) return drop(uid) end -function role_check_grant_revoke_of_sys_priv(priv) +local function role_check_grant_revoke_of_sys_priv(priv) priv = string.lower(priv) if (type(priv) == 'string' and (priv:match("session") or priv:match("usage"))) or (type(priv) == "number" and (bit.band(priv, 8) ~= 0 or bit.band(priv, 16) ~= 0)) then -- 2.23.0