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 270442AA56 for ; Thu, 6 Sep 2018 16:03:48 -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 hEf4kLoNZWai for ; Thu, 6 Sep 2018 16:03:48 -0400 (EDT) Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [94.100.177.93]) (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 DB47C2AA36 for ; Thu, 6 Sep 2018 16:03:47 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 1/1] lua: strength in the _collation space References: From: Vladislav Shpilevoy Message-ID: <3d457119-b75b-2a80-5d17-ec014090e584@tarantool.org> Date: Thu, 6 Sep 2018 23:03:44 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed 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: imeevma@tarantool.org, tarantool-patches@freelists.org Hi! Thanks for the patch! On 06/09/2018 21:29, imeevma@tarantool.org wrote: > This patch sets "primary" strength as default for collations. > > Closes #3573 > --- > Branch: https://github.com/tarantool/tarantool/tree/imeevma/gh-3573-show-collation-strength > Issue: https://github.com/tarantool/tarantool/issues/3573 > > src/box/bootstrap.snap | Bin 1888 -> 1883 bytes > src/box/lua/schema.lua | 5 ++++- > src/box/lua/upgrade.lua | 2 +- > 3 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua > index d9c2ae4..e09318b 100644 > --- a/src/box/lua/upgrade.lua > +++ b/src/box/lua/upgrade.lua > @@ -396,7 +396,7 @@ local function create_collation_space() > box.space._index:insert{_collation.id, 1, 'name', 'tree', {unique = true}, {{1, 'string'}}} > > log.info("create predefined collations") > - box.space._collation:replace{1, "unicode", ADMIN, "ICU", "", setmap{}} > + box.space._collation:replace{1, "unicode", ADMIN, "ICU", "", {strength='primary'}} Unfortunately, you can not change the past. This code does update to 1.7.6 which is already released long ago and we already have clients on this version. So their unicode collation already has no strength. Why are you trying to change it? Anyway a user is able to do raw insertion right into _collation space omitting high level API that you fixed in the previous hunk. C code should be ready to the fact that a new collation may have no any specified strength. Also, what about Vinyl users who are using collations? Does this update of strength change order of sorting of disk data? > box.space._collation:replace{2, "unicode_ci", ADMIN, "ICU", "", {strength='primary'}} > > local _priv = box.space[box.schema.PRIV_ID] >