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 525B52A6FE for ; Wed, 27 Mar 2019 10:26:10 -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 dtcTTNpv3M2K for ; Wed, 27 Mar 2019 10:26:10 -0400 (EDT) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 EEE872A6FC for ; Wed, 27 Mar 2019 10:26:09 -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> From: Vladislav Shpilevoy Message-ID: Date: Wed, 27 Mar 2019 17:26:07 +0300 MIME-Version: 1.0 In-Reply-To: <17D31B00-F24C-48C8-BE9D-CA4D32D35484@tarantool.org> 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 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)