From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (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 E0DB44696C3 for ; Wed, 15 Apr 2020 02:30:43 +0300 (MSK) References: From: Vladislav Shpilevoy Message-ID: <9b6636e7-28e9-290c-d940-adc4a7e120cb@tarantool.org> Date: Wed, 15 Apr 2020 01:30:41 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: [Tarantool-patches] [PATCH v3 8/6] schema: fix internal symbols dangling in _G List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Bronnikov , avtikhon@tarantool.org, alexander.turenko@tarantool.org, o.piskunov@tarantool.org, tarantool-patches@dev.tarantool.org 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. diff --git a/src/box/lua/schema.lua b/src/box/lua/schema.lua index ad4a5470b..80e67a82a 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