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 078A42AA48 for ; Wed, 27 Mar 2019 11:01:20 -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 evQqSB3aOvV2 for ; Wed, 27 Mar 2019 11:01:19 -0400 (EDT) Received: from smtp34.i.mail.ru (smtp34.i.mail.ru [94.100.177.94]) (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 95B7A2A9D7 for ; Wed, 27 Mar 2019 11:01:19 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: [tarantool-patches] Re: [PATCH] sql: set explicit default collation's strength From: "i.koptelov" In-Reply-To: Date: Wed, 27 Mar 2019 18:01:17 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190326203456.76617-1-ivan.koptelov@tarantool.org> <8ab84a8f-213e-4bcd-217d-e5f694b70693@tarantool.org> <17D31B00-F24C-48C8-BE9D-CA4D32D35484@tarantool.org> 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: tarantool-patches@freelists.org Cc: Vladislav Shpilevoy > On 27 Mar 2019, at 17:26, Vladislav Shpilevoy = wrote: >=20 > 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. >=20 > 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 >=20 > local function update_collation_strength_field() > local _collation =3D box.space[box.schema.COLLATION_ID] > - for _, collation in ipairs(_collation:select()) do > - if collation.opts.strength =3D=3D nil and collation.name ~=3D = 'none' and > - collation.name ~=3D 'binary' then > - local new_collation =3D = _collation:get{collation.id}:totable() > + for _, collation in _collation:pairs() do > + if collation.type =3D=3D 'ICU' and collation.opts.strength =3D=3D= nil then > + local new_collation =3D collation:totable() > new_collation[6].strength =3D 'tertiary' > _collation:delete{collation.id} > _collation:insert(new_collation) >=20 Ok, done. Tests are not broken, bootstrap.snap is regenerated.=