From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id E6634298BF for ; Thu, 28 Mar 2019 07:45:12 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w6-Oft2k-ypy for ; Thu, 28 Mar 2019 07:45:12 -0400 (EDT) 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 turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 973A929447 for ; Thu, 28 Mar 2019 07:45:12 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH] sql: set explicit default collation's strength References: <20190326203456.76617-1-ivan.koptelov@tarantool.org> <8ab84a8f-213e-4bcd-217d-e5f694b70693@tarantool.org> <17D31B00-F24C-48C8-BE9D-CA4D32D35484@tarantool.org> <085718fe-734f-f141-b914-b21050f6e28c@tarantool.org> From: Vladislav Shpilevoy Message-ID: <32cb5a53-98c2-c663-0f0e-b2c5e1aeb3fc@tarantool.org> Date: Thu, 28 Mar 2019 14:45:09 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: "i.koptelov" , tarantool-patches@freelists.org, Kirill Yukhin LGTM. On 28/03/2019 09:55, i.koptelov wrote: > > >> On 27 Mar 2019, at 22:32, Vladislav Shpilevoy wrote: >> >> >> >> On 27/03/2019 22:32, Vladislav Shpilevoy wrote: >>> >>> >>> On 27/03/2019 18:01, i.koptelov wrote: >>>> >>>> >>>>> On 27 Mar 2019, at 17:26, Vladislav Shpilevoy wrote: >>>>> >>>>> Please, apply the diff below. Be careful because I haven't tested it. >>>>> Fix it, if tests fail, and do not forget to regenerate boostrap.snap. >>>>> >>>>> diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua >>>>> index a23d0af64..37ab76177 100644 >>>>> --- a/src/box/lua/upgrade.lua >>>>> +++ b/src/box/lua/upgrade.lua >>>>> @@ -638,10 +638,9 @@ end >>>>> >>>>> local function update_collation_strength_field() >>>>> local _collation = box.space[box.schema.COLLATION_ID] >>>>> - for _, collation in ipairs(_collation:select()) do >>>>> - if collation.opts.strength == nil and collation.name ~= 'none' and >>>>> - collation.name ~= 'binary' then >>>>> - local new_collation = _collation:get{collation.id}:totable() >>>>> + for _, collation in _collation:pairs() do >>>>> + if collation.type == 'ICU' and collation.opts.strength == nil then >>>>> + local new_collation = collation:totable() >>>>> new_collation[6].strength = 'tertiary' >>>>> _collation:delete{collation.id} >>>>> _collation:insert(new_collation) >>>>> >>>> Ok, done. Tests are not broken, bootstrap.snap is regenerated. >>>> >>> >>> Looks like it is not done. You ignored last two lines: fix of >>> indentation and fix of excess lookup of a tuple which you already >>> have from pairs. >>> >> >> Sorry, indentation is ok. Only double lookup still is unfixed. >> > Sorry, fixed now. >