From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 7E8048205E; Sun, 24 Jan 2021 20:34:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7E8048205E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611509682; bh=/ttxPc5h1/d+VAUtB34+KICR0wVhS+vJFr5F5LGHBQI=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Ix9nccIltRloLUUlSN5lpQtRWmpVZ2ejNSo/DrSnoWXe3zY3y81yhrWDxF8VXmGa2 DlcIN0BU/Mp7dntIK3S4i5aEav7AVs8VwDYWZbH13dBth0aA0wxT8ArmhMws8yslTJ hwoD8vl8VF9ZUokz5i64pJa9UFctz7+OeV2vpTAk= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 EB5DE8205E for ; Sun, 24 Jan 2021 20:34:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EB5DE8205E Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1l3jHc-0000Eu-1o; Sun, 24 Jan 2021 20:34:40 +0300 To: sergeyb@tarantool.org, tarantool-patches@dev.tarantool.org References: Message-ID: <77aeb2c2-7d55-f86d-5874-2300c6c975c3@tarantool.org> Date: Sun, 24 Jan 2021 18:34:39 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9F0E84CC1954AA438CF139A4DF54DC2E88E2FE7C97C65DF6000894C459B0CD1B9E94D348EF7BFB01F4C745B93666A53EE1F942A5D71E7AEBEA2698D7B1DC6BD28 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7BF6702EC5472AA0FEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373D58C44ED3182E498638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCBDC2C7681C9E6372AFB5FCE6E1734560D5A676A18E42A03E389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A3E989B1926288338941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B68424CA1AAF98A6958941B15DA834481F9449624AB7ADAF3735872C767BF85DA29E625A9149C048EE0A3850AC1BE2E7358734EF69C36C4A4D4AD6D5ED66289B524E70A05D1297E1BB35872C767BF85DA227C277FBC8AE2E8B98F1C5DF904E309E75ECD9A6C639B01B4E70A05D1297E1BBC6867C52282FAC85D9B7C4F32B44FF57E8FBB06288C1946000306258E7E6ABB4E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A511512D7BD4038E8BFB6B03B7C6DABDA650067614C2A71665D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D95739AEDB3821B46258E935FB0021971C98B18D44A57B84997C3D5F3C848352D4CE0633E6CD323E1D7E09C32AA3244C77AE5EE8EC805567DEE947C5A91E5899C3B3ADDA61883BB5FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojEcKN7r9rK/0Fg/jCAeUEeg== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822070D1FDEDE4B9B944AFC43FA78265BDA3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v8 04/14] test: fix luacheck warnings W211 in test/sql-tap X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch! See 2 comments below. On 21.01.2021 13:49, sergeyb@tarantool.org wrote: > From: Sergey Bronnikov > > W211 (Unused local variable) > > Part of #5464 > > test: fix luacheck warnings W111 in test/sql-tap > --- > diff --git a/test/sql-tap/e_expr.test.lua b/test/sql-tap/e_expr.test.lua > index 81b08e223..f29b26175 100755 > --- a/test/sql-tap/e_expr.test.lua > +++ b/test/sql-tap/e_expr.test.lua > @@ -1080,7 +1080,6 @@ if (0>0) then > local function parameter_test(tn, sql, params, result) > local stmt = sql_prepare_v2("db", sql, -1) > for _ in X(0, "X!foreach", [=[["number name",["params"]]]=]) do > - local nm = sql_bind_parameter_name(stmt, number) 1. You should not delete the function call. It seems it must have had an effect on the statement object. Without this call in future it will be harder to understand what is missing if you delete it. > X(480, "X!cmd", [=[["do_test",[["tn"],".name.",["number"]],[["list","set","",["nm"]]],["name"]]]=]) > sql_bind_int(stmt, number, ((-1) * number)) > end > diff --git a/test/sql-tap/misc1.test.lua b/test/sql-tap/misc1.test.lua > index 7d928bea0..b1c4f026b 100755 > --- a/test/sql-tap/misc1.test.lua > +++ b/test/sql-tap/misc1.test.lua > @@ -726,19 +726,8 @@ test:do_execsql_test( > -- MUST_WORK_TEST collate > if 0>0 then > db("collate", "numeric", "numeric_collate") > - local function numeric_collate(lhs, rhs) > - if (lhs == rhs) > - then > - return 0 > - end > - return X(0, "X!expr", [=[["?:",[">",["lhs"],["rhs"]],3,["-",1]]]=]) > - end 2. The more I look at these db + X pairs, the more it seems like an artifact after TCL -> Lua conversion. I think originally it was supposed that the function after 'db()' should be called, and 'X' should execute something. Worth investigating how these tests looked originally. Otherwise we may delete too much and not able to resurrect the tests in future. If these code blocks are important for understanding the test (which I don't understand now, but anyway), maybe it would better to comment them out instead of deleing. Or delete the entire test cases if we are not going to try to resurrect them, which is also fine.