From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 440F74696C6 for ; Wed, 8 Apr 2020 18:43:31 +0300 (MSK) Received: by mail-lj1-f196.google.com with SMTP id b1so8149978ljp.3 for ; Wed, 08 Apr 2020 08:43:31 -0700 (PDT) From: Sergey Bronnikov Date: Wed, 8 Apr 2020 18:43:02 +0300 Message-Id: <40b04e95986eab28852e0ea8e1db5297b4bb169f.1586341316.git.sergeyb@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v2 3/6] Fix luacheck warnings in src/box/lua/ List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org Cc: o.piskunov@tarantool.org From: Sergey Bronnikov Closes #4681 --- src/box/lua/upgrade.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua index 075cc236e..6b8ece513 100644 --- a/src/box/lua/upgrade.lua +++ b/src/box/lua/upgrade.lua @@ -173,7 +173,7 @@ local function initial_1_7_5() format[5] = {name='field_count', type='unsigned'} format[6] = {name='flags', type='map'} format[7] = {name='format', type='array'} - local def = _space:insert{_space.id, ADMIN, '_space', 'memtx', 0, MAP, format} + _space:insert{_space.id, ADMIN, '_space', 'memtx', 0, MAP, format} -- space name is unique log.info("create index primary on _space") _index:insert{_space.id, 0, 'primary', 'tree', { unique = true }, {{0, 'unsigned'}}} @@ -194,7 +194,7 @@ local function initial_1_7_5() format[4] = {name = 'type', type = 'string'} format[5] = {name = 'opts', type = 'map'} format[6] = {name = 'parts', type = 'array'} - def = _space:insert{_index.id, ADMIN, '_index', 'memtx', 0, MAP, format} + _space:insert{_index.id, ADMIN, '_index', 'memtx', 0, MAP, format} -- index name is unique within a space log.info("create index primary on _index") _index:insert{_index.id, 0, 'primary', 'tree', {unique = true}, {{0, 'unsigned'}, {1, 'unsigned'}}} @@ -211,7 +211,7 @@ local function initial_1_7_5() format[2] = {name='owner', type='unsigned'} format[3] = {name='name', type='string'} format[4] = {name='setuid', type='unsigned'} - def = _space:insert{_func.id, ADMIN, '_func', 'memtx', 0, MAP, format} + _space:insert{_func.id, ADMIN, '_func', 'memtx', 0, MAP, format} -- function name and id are unique log.info("create index _func:primary") _index:insert{_func.id, 0, 'primary', 'tree', {unique = true}, {{0, 'unsigned'}}} @@ -231,7 +231,7 @@ local function initial_1_7_5() format[3] = {name='name', type='string'} format[4] = {name='type', type='string'} format[5] = {name='auth', type='map'} - def = _space:insert{_user.id, ADMIN, '_user', 'memtx', 0, MAP, format} + _space:insert{_user.id, ADMIN, '_user', 'memtx', 0, MAP, format} -- user name and id are unique log.info("create index _func:primary") _index:insert{_user.id, 0, 'primary', 'tree', {unique = true}, {{0, 'unsigned'}}} @@ -251,7 +251,7 @@ local function initial_1_7_5() format[3] = {name='object_type', type='string'} format[4] = {name='object_id', type='unsigned'} format[5] = {name='privilege', type='unsigned'} - def = _space:insert{_priv.id, ADMIN, '_priv', 'memtx', 0, MAP, format} + _space:insert{_priv.id, ADMIN, '_priv', 'memtx', 0, MAP, format} -- user id, object type and object id are unique log.info("create index primary on _priv") _index:insert{_priv.id, 0, 'primary', 'tree', {unique = true}, {{1, 'unsigned'}, {2, 'string'}, {3, 'unsigned'}}} @@ -580,7 +580,7 @@ local function upgrade_to_2_1_0() -- Now, abscent field means NULL, so we can safely set second -- field in format, marking it nullable. log.info("Add nullable value field to space _schema") - local format = {} + format = {} format[1] = {type='string', name='key'} format[2] = {type='any', name='value', is_nullable=true} box.space._schema:format(format) -- 2.23.0